What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-30 19:36:38
create moment duration
moment.duration(2, 'seconds'); moment.duration(2, 'minutes'); moment.duration(2, 'hours'); moment.duration(2, 'days'); moment.duration(2, 'weeks'); moment.duration(2, 'months'); moment.duration(2, 'years'); moment.duration('2', 'years'); // from 2.25.0 /... Add solution -
Javascript 2021-09-18 05:33:02
js Date(date).toLocaleString() MINUUTES
var dt = new Date(); console.log(dt); const localdte = dt.toLocaleString(); console.log(localdte); const [dated, time, ampm] = localdte.split(' '); const [hh, mm, ss] = time.split(':'); var date = `${ dt.getDate().toString().padStart(2, '0')}/${ (... Add solution -
Other 2021-08-27 08:50:02
what is startof() in moment
moment().startOf('year'); // set to January 1st, 12:00 am this year moment().startOf('month'); // set to the first of this month, 12:00 am moment().startOf('quarter'); // set to the beginning of the current quarter, 1st day of months, 12:00 am momen... Add solution