YUI recommends YUI 3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

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.



String format ( oDate , oConfig , sLocale )
Takes a native JavaScript Date and formats to string for display to user.
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:
US English
British English
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.