The string format accepts the same formats I described in the “Parse a date” section above.Įxample: moment (). Moment offers a handy way to format the date according to your needs, using the format() method: date. All you can do is to use the built-in methods, and compose the date as you want using them. When you want to output the content of a plain JavaScript Date object, you have little options to determine the formatting. Here’s a format reference: FormatĢ-digits hours (24 hour time) from 0 to 23Ģ-digits hours (24 hour time) from 0 to 23 without leading 0Ģ-digits hours (24 hour time) from 1 to 24Ģ-digits hours (24 hour time) from 1 to 24 without leading 0 ISO 8601 is definitely the most convenient.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |