如何扩展 datejs解析“2013 年 4 月 25 日 1200”?
最佳答案
我猜你需要使用 Date.parseExact
:
Date.parseExact ( String dateString, String formatStringOrArray ) : Date
Converts the specified string value into its JavaScript Date equivalent using the specified format (string) or formats (array). The format of the string value must match one of the supplied formats exactly.
示例:
Date.parseExact("25 Apr 2013 1200", "d MMM yyyy Hm");
引用: https://code.google.com/p/datejs/wiki/APIDocumentation#parseExact
关于javascript - 扩展 datejs 以解析字符串 2013 年 4 月 25 日 1200,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16221088/