最佳 JavaScript 日期解析器格式化程序? [英] Best JavaScript Date Parser & Formatter?

查看:27
本文介绍了最佳 JavaScript 日期解析器格式化程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我开始使用 jQuery 以来,我一直在做更多的 JavaScript 开发.

Since I've started to use jQuery, I have been doing a lot more JavaScript development.

我需要解析不同的日期格式,然后将它们显示为另一种格式.

I have the need to parse different date formats and then to display them into another format.

你知道有什么好的工具可以做到这一点吗?

Do you know of any good tool to do this?

你会推荐哪一个?

推荐答案

2014 更新:Moment.js 是一个优秀的日期操作库,包括解析函数.它不包括自动日期格式检测,但您可以指定多种解析模式.

2014 update: Moment.js is an excellent date manipulation library, which includes parsing functions. It doesn't include automatic date format detection, but you can specify multiple parsing patterns.

您是否事先知道日期的格式,或者它们是用户输入的?

Do you know the format of the dates before hand though, or are they user input?

已弃用的用于解析日期的库是 Datejs.自 2007 年以来就没有更新过.

A deprecated library for parsing dates is Datejs. It hasn't been updated since 2007.

这篇关于最佳 JavaScript 日期解析器格式化程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆