Class Index | File Index

Classes


Built-In Class Date

The built-in Date class.

Method Summary
Method Attributes Method Name and Description
 
format(format)
Converts a date to a string using the specified formatting.
<static>  
Date.parse(s, format)
Parses a date from a string, optionally using the specified formatting.
Method Detail
{string} format(format)

Converts a date to a string using the specified formatting. If the Date object already supports the toLocaleFormat method, as in Firefox, this is simply an alias to the built-in method.

The format string is in the same format expected by the strftime function in C. The following conversion specifications are supported:

The following conversion specifications are unsupported (for now):

Parameters:
{string} format
a format string.
Returns:
{string} the formatted date.
See:
Date.toLocaleFormat documentation.
strftime documentation.

<static> {Date} Date.parse(s, format)

Parses a date from a string, optionally using the specified formatting. If only a single argument is specified (i.e., format is not specified), this method invokes the native implementation to guarantee backwards-compatibility.

The format string is in the same format expected by the strptime function in C. The following conversion specifications are supported:

The following conversion specifications are unsupported (for now):

Parameters:
{string} s
the string to parse as a date.
{string} format Optional
an optional format string.
Returns:
{Date} the parsed date.
See:
strptime documentation.

Documentation generated by JsDoc Toolkit 2.3.0 on Sat Sep 19 2009 10:26:36 GMT-0700 (PDT)