Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #13021

Re: +new Date("2012-03-21") and +new Date("2012/03/21") can differ by up to about 432e5

From Dr J R Stockton <reply1212@merlyn.demon.co.uk.not.invalid>
Newsgroups comp.lang.javascript
Subject Re: +new Date("2012-03-21") and +new Date("2012/03/21") can differ by up to about 432e5
Date 2012-03-23 22:25 +0000
Organization Home
Message-ID <2MYi6wH0hPbPFwIa@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <ER$+NdFv4iaPFw2u@invalid.uk.co.demon.merlyn.invalid> <XnsA01EB082E8886eejj99@194.109.133.133>

Show all headers | View raw


In comp.lang.javascript message <XnsA01EB082E8886eejj99@194.109.133.133>
, Thu, 22 Mar 2012 16:21:07, Evertjan. <exjxw.hannivoort@interxnl.net>
posted:

>Dr J R Stockton wrote on 21 mrt 2012 in comp.lang.javascript:
>
>> For those who had not noticed : it appears that the results from each
>> line in
>>
>>         +new Date("2012/01/21")         &       +new Date("2012-01-21")
>> and
>>         +new Date("2012/07/21")         &       +new Date("2012-07-21")
>>
>> can differ by up to about 432e5, dependent on location.
>
>About? The below shows exactly one or two hours difference overhere [CET].

You're quite near the Greenwich Meridian.  Australians and Hawaiians are
about 10 hours away, Kiribatians 14 hours I think.

<FAQENTRY> new Date("YYYY/MM/DD") is not specified to work, but always
gives that date, local 0 hours. But new Date("YYYY-MM-DD") is specified
to work, but, although the string is a common ISO 8601 representation of
0h local on that date, that expression gives 0h GMT of that date.

Someone has been Really Stupid there, and it will lead to incessant
error.


Over here the general view is that the Dutch all use excellent English,
though perhaps with a slight accent (and peculiar spelling).  Which is
more than can be said for anyone raised at more than 30 degrees West
longitude.  In that region, being north of the 49th parallel helps less
than it used to.

-- 
 (c) John Stockton, nr London, UK.    ?@merlyn.demon.co.uk     Turnpike v6.05.
 Website  <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
 PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm
 Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

+new Date("2012-03-21") and +new Date("2012/03/21")  can differ by up to about 432e5 Dr J R Stockton <reply1212@merlyn.demon.co.uk.not.invalid> - 2012-03-21 19:38 +0000
  Re: +new Date("2012-03-21") and +new Date("2012/03/21")  can differ by up to about 432e5 "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-22 16:21 +0000
    Re: +new Date("2012-03-21") and +new Date("2012/03/21")  can differ by up to about 432e5 Dr J R Stockton <reply1212@merlyn.demon.co.uk.not.invalid> - 2012-03-23 22:25 +0000
      Re: +new Date("2012-03-21") and +new Date("2012/03/21")  can differ by up to about 432e5 "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-24 00:09 +0000

csiph-web