[英]`new Date(“2013-08-08T09:40”)` not working in jweek calendar plugin
I have problem with jquery weekcalendar demo plugin
Its work in Mozilla but not in Chrome . 我对jquery weekcalendar demo plugin
有问题,它可以在Mozilla中工作,但不能在Chrome中工作。
I Found Problem its with Datetime
: 我发现问题与Datetime
:
In DEMO.JS
File : 在DEMO.JS
文件中:
alert(new Date("2013-08-08T09:40"));
so its work with Mozilla Firefox with output Its fine 因此它可以与Mozilla Firefox一起使用,并且输出良好
But in Chrome (Version 28.0.1500.95m) its not working : Wrong output : 但是在Chrome(版本28.0.1500.95m)中,它不起作用:输出错误:
So please help me out . 所以请帮帮我。 I need same output with chrome also 我也需要与chrome相同的输出
Proper format is 正确的格式是
new Date("2013-08-08T09:40Z");
http://www.w3.org/TR/NOTE-datetime http://www.w3.org/TR/NOTE-datetime
If you want to play the local timezone game then you must manually calculate the offset you want and use it in the format: 如果要玩本地时区游戏,则必须手动计算所需的偏移量,并使用以下格式:
new Date("2013-08-08T09:40+05:30");
It is easier to just use UTC though. 不过,仅使用UTC更容易。
If you don't want to specify any timezone, you need to use different constructor: 如果您不想指定任何时区,则需要使用其他构造函数:
new Date(2013, 7, 8, 9, 40);
This will result in an instant that is dependent on whatever timezone settings the user has on their computer. 这将导致瞬间取决于用户在计算机上设置的时区设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.