Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

format dates momentjs

moment().format('MMMM Do YYYY, h:mm:ss a'); // May 9th 2022, 12:53:37 am
moment().format('dddd');                    // Monday
moment().format("MMM Do YY");               // May 9th 22
moment().format('YYYY [escaped] YYYY');     // 2022 escaped 2022
moment().format();                          // 2022-05-09T00:53:37+05:30
Source by momentjs.com #
 
PREVIOUS NEXT
Tagged: #format #dates #momentjs
ADD COMMENT
Topic
Name
7+3 =