【发布时间】:2017-05-05 16:08:00
【问题描述】:
我有这个格式的日期:
01Mar-023426Feb-0430
01 是 day,mar 或 feb 是 mounth,0430 是 4 oclock 30 in formater zulu +00。
我想用 moment 来转换这种格式,我正在尝试这个:
moment('26Feb-0430').format("DD-MM-YY HH:MM");
但我没有很好的格式,我有这个错误:
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment c
onstruction falls back to js Date(), which is not reliable across all browsers and version
s. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major r
elease. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
你能帮我设置夏天的26/02/2017 06:30 和冬天的5h30 吗?
【问题讨论】:
-
您是否访问了该错误消息中的链接?因为很清楚你需要做什么来修复它。还有momentjs.com/docs/#/parsing/string-format。
标签: javascript node.js momentjs