![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archiveRe: Australian Date
From: Evertjan. <exjxw.hannivoort@interxnl.net>
Date: Wed Nov 23 2005 - 10:53:21 CET
wrote on 23 nov 2005 in comp.lang.javascript:
> Hi,
Wrong example, this is not working like you describe:
> var time = new Object;
<script type='text/jscript'>
var time = new Date("24/11/05"); //Nov. 24, 2005
// Tue Dec 11 00:00:00 UTC+0100 1906
</script>
This code works correctly, as the machine interprets
[Depending on your regional setting being dd/mm/yyyy]
===========================
Solution [regional settings independent]:
always use yyyy/mm/dd
var time = new Date("2005/11/24"); //Nov. 24, 2005
-- Evertjan. The Netherlands. (Replace all crosses with dots in my emailaddress)Received on Sat Dec 3 04:28:56 2005 |