Tag: datetime

有没有任何解决方法破v8dateparsing器?

V8dateparsing器已损坏: > new Date('asd qw 101') Sat Jan 01 101 00:00:00 GMT+0100 (CET) 我可以像这样使用脆弱的正则expression式: \d{1,2} (jan|feb|mar|may|jun|jul|aug|sep|oct|nov|dec) \d{1,4} 但它太脆弱了。 我不能依靠new Date (V8发行) ,也不能帮助我,因为时刻正在摆脱date检测(github问题线程) 。 有没有任何解决方法破v8dateparsing器? 要清楚。 我们有Gecko和V8,都有Date 。 V8已经打破date,壁虎有工作之一。 我需要Gecko(Firefox)中的Date 。 更新:这绝对是破解器https://code.google.com/p/v8/issues/detail?id=2602 Status: WorkingAsIntended , Status: WorkingAsIntended

如何在Nodejs中使用时区偏移?

我需要下一个stream程: var a = new Date(1337324400000, 'Europe/Amsterdam'); //+2h console.log(a); // for example 12:00 Mon … a.setTimeZone('Europe/Kiev'); //+3h console.log(a); // 13:00 Mon … nodejs utils api中有这种可能吗?