D
Dr J R Stockton
In comp.lang.javascript message <b54b40bb-283a-4275-ac99-baad7f8d2f18@q1
4g2000vbn.googlegroups.com>, Wed, 3 Jun 2009 15:57:24, Adam Peller
That is best done, in JavaScript, by using just the UTC methods and then
having all times-of-day (by default) zero.
Replace new Date(Y, M, D) by new Date(Date.UTC(Y, M, D))
and new Date(String) by new Date(String + " GMT")
and don't use, explicitly or implicitly, Date's toString method.
Alternatively, don't use Date Objects; use a positive Daycount from some
convenient and preferably standard origin, and have routines to convert
between Y M D and daycount and string. See my site.
4g2000vbn.googlegroups.com>, Wed, 3 Jun 2009 15:57:24, Adam Peller
In most examples in Dojo, Date objects are used for a single point in
time or to represent a date where the time portion is ignored, in
which case a Date object really isn't precise (the old date vs
datetime problem)
That is best done, in JavaScript, by using just the UTC methods and then
having all times-of-day (by default) zero.
Replace new Date(Y, M, D) by new Date(Date.UTC(Y, M, D))
and new Date(String) by new Date(String + " GMT")
and don't use, explicitly or implicitly, Date's toString method.
Alternatively, don't use Date Objects; use a positive Daycount from some
convenient and preferably standard origin, and have routines to convert
between Y M D and daycount and string. See my site.