How to handle dates in Backbone?

后端 未结 3 1835
醉话见心
醉话见心 2021-02-14 11:31

I store dates in the DATETIME format in a MySQL database. When a model is fetched from the database, dates (in the DATETIME format) are converted to date objects in the model\'s

3条回答
  •  遥遥无期
    2021-02-14 12:11

    May not be the answer your looking for - but have seen folks use moment.js to format time in backbone -

    http://momentjs.com/

提交回复
热议问题