July 4, 2000 - Converting Dates to Strings
July 4, 2000 Converting Dates to Strings Tips: July 2000
Yehuda Shiran, Ph.D.
|
and by the Time tab:
If we define
x
, for example, as:
x = new Date();
then the command alert(x.toLocaleString())
will generate the following box:
Notice how the format is as specified in the Regional Settings under the Date tab above, for Internet Explorer 5.5. For previous versions of IE and for pre 6 versions of Netscape Navigator, dates are formatted according to a single specification that you don't have control over. In Netscape Navigator 4.08, for example, the format is as shown above, but without the AM/PM indication.