时间戳php到jquery格式

时间:2014-02-18 16:09:12

标签: javascript jquery json

我正在寻找jquery中的函数,这给了我相同的时间格式,就像这样。

date( 'Y-m-d\TH:i:sP');
//the output is like this.
2013-10-30T18:10:28+01:00

我需要这种格式,但在jquery中,放入我的车。谢谢!

1 个答案:

答案 0 :(得分:1)

JavaScript和jQuery都没有内置的库方法,只需一步即可完成。您可以找到各种插件来帮助或编写自己的插件:

请参阅Where can I find documentation on formatting a date in JavaScript?

并查看http://momentjs.com/https://github.com/phstc/jquery-dateFormat