«
jsDate

Class index

jsDate.config
Configuration options that will be used as defaults for all instances on the page.
jsDate.formats
Namespace to hold format codes and format shortcuts. "perl" and "php" format codes and shortcuts are defined by default. Additional codes and shortcuts can be added like:
jsDate.formats["perl"] = {
    "codes": {
        matcher: /someregex/,
        Y: "fullYear",  // name of "get" method without the "get",
        ...,            // more codes
    },
    "shortcuts": {
        F: '%Y-%m-%d',
        ...,            // more shortcuts
    }
};

Additionally, ISO and SQL shortcuts are defined and can be accesses via: jsDate.formats.ISO and jsDate.formats.SQL

jsDate.regional
Holds localizations for month/day names.

jsDate attempts to detect locale when loaded and defaults to 'en'. If a localization is detected which is not available, jsDate defaults to 'en'. Additional localizations can be added after jsDate loads. After adding a localization, call the jsDate.regional.getLocale() method. Currently, en, fr and de are defined.

Localizations must be an object and have the following properties defined: monthNames, monthNamesShort, dayNames, dayNamesShort and Localizations are added like:

jsDate.regional['en'] = {
monthNames      : 'January February March April May June July August September October November December'.split(' '),
monthNamesShort : 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' '),
dayNames        : 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday'.split(' '),
dayNamesShort   : 'Sun Mon Tue Wed Thu Fri Sat'.split(' ')
};

After adding localizations, call jsDate.regional.getLocale(); to update the locale setting with the new localizations.

©2010 Chris Leonello

Documentation generated using JsDoc Toolkit 2.4.0 on Fri Dec 03 2010 15:36:44 GMT-0500 (EST)