JavaScript really needs the powerful text processing capabilities of PERL -- Lets hope either Netscape adds them or somebody builds these functions |
On the otherhand JavaScript like Java has an amazing number of capabilities associated with the Date object including 21 builtin methods |
today = new Date(); // sets today to current Date and Time |
asiwrite = new Date("February 26, 1996 15:13:00"); // sets asiwrite to date and time that these notes were prepared! |
Note both Java and JavaString store dates internally as number of elapsed milliseconds since January 1,1970 00:00:00. |
In a Java lookalike, Date.UTC(date as bunch of numbers) and Date.parse(date as a text string) are "class or static" methods |
There are methods such as getMonth which extracts month from a date |
See the online resource for all possible methods! |