Is there a built-in function or plugin to handle date formatting in JavaScript?

后端 未结 3 1502
眼角桃花
眼角桃花 2020-11-30 14:40

Currently I need to output a date in a: \'5 October, 2012\' type format. Meaning day-of-month with no leading zeros, space, full month name, comma, space, four-digit year. I

3条回答
  •  天命终不由人
    2020-11-30 15:39

    No, there is nothing built-in for Dateobjects, but there are a bunch of libraries to deal with and format them:

    • date.js
    • moment.js
    • XDate
    • Date and Date.Extras in Mootools
    • Date in Sugar
    • Dojo.date
    • a few functions in Mochikit
    • DateFormat (only PHP's date)
    • date at php.js
    • DataType in YUI, especially for i18n
    • date-functions.js, used especially by JQuery datetimepicker plugin

提交回复
热议问题