YUI recommends YUI 3.

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

Yahoo! UI Library

Date Utility  2.4.1

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

Show Private Show Protected

static Class YAHOO.util.Date

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

Methods

format

String format ( oDate , oConfig )
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>
Currently only the following formats are supported: "MM/DD/YYYY", "YYYY/MM/DD", or "DD/MM/YYYY"
Returns: String
Formatted date for display.


Copyright © 2007 Yahoo! Inc. All rights reserved.