Answers for "moment() functions"

1

moment.add

var newDate = moment().add(1, 'hours').add(10,"m");
//years or y
//quarters or Q
//months or M
//weeks or w
//days or d
//hours or h
//minutes or m
//seconds	or s
//milliseconds or ms
Posted by: Guest on September-20-2021
0

date format in moment js

moment().format('MMMM Do YYYY'); // April 14th 2021, 5:38:13 pm
moment().format('dddd');                    // Wednesday
moment().format("MMM Do YY");               // Apr 14th 21
moment().format('YYYY [escaped] YYYY');     // 2021 escaped 2021
moment().format();                          // 2021-04-14T17:38:13+06:00
Posted by: Guest on April-14-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language