如何正确设置 datejs 中的 dateElementOrder 以使用部分日期
在 datejs 中,如果我将 dateElementOrder 设置为“dmy”的 pt-PT 本地化版本或“ymd”而不是“mdy”,“部分”测试夹具上的以下测试开始失败:
1/2008; 1 2008 年; 1-2008; 2008/1; 2008 1; 2008-1
我需要做什么才能让它发挥作用?
In datejs, if i set the dateElementOrder to the pt-PT localized version of "dmy" or "ymd" instead of "mdy" the following tests on the "Partial" test fixture start to fail:
1/2008; 1 2008; 1-2008; 2008/1; 2008 1; 2008-1
What do i need to do to make it work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对你使用的东西没有经验,但它的定义是字面意思是“dmy”而不是“mdy”吗? 我想你会区分天和月,也许通过确保月份被列为 01、02、03 等...,而天只是单位数天的单位数?
这可能是一个错误,您是否已将问题发布到他们的问题页面? 在执行此操作之前,请仔细检查所有语法,以确保这不是一个简单的错误。 JavaScript 可能会变得混乱。
I have no experience with what you are using, but is it defined as literally "dmy" instead of "mdy"? I would imagine you would differentiate between days and months, perhaps by making sure that months are listed as 01, 02, 03, etc..., where as days would just be single digits for single digit days?
It might be a bug, have you posted the issue to their Issues page? Double-check all your syntax before you do so, just to make sure it's not a simple mistake somewhere along the line. Javascript can get messy.