Yahoo! UI Library

DataSource Utility  2.6.0

Yahoo! UI Library > datasource > YAHOO.util.Date

static Class YAHOO.util.Date

The static Date class provides helper functions to deal with data of type Date.

Methods

format

String format ( oDate , oConfig , sLocale )
Takes a native JavaScript Date and formats to string for display to user.
Parameters:
oDate <Date> Date.
oConfig <Object} (Optional) Optional configuration values:
format {String>
Any format defined by strftime is supported
strftime has several format specifiers defined by the Open group at http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html PHP added a few of its own, defined at http://www.php.net/strftime This javascript implementation supports all the PHP specifiers and a few more.
sLocale <String> (Optional) The locale to use when displaying days of week, months of the year, and other locale specific strings. The following locales are built in:
en
English
en-US
US English
en-GB
British English
en-AU
Australian English (identical to British English)
More locales may be added by subclassing of YAHOO.util.DateLocale. See YAHOO.util.DateLocale for more information.
Returns: String
Formatted date for display.


Copyright © 2008 Yahoo! Inc. All rights reserved.