YUI 3.x Home -

YUI Library Examples: DataType Utility: DataType.Date.parse()

Note: This is YUI 3.x. Looking for YUI 2.x?

DataType Utility: DataType.Date.parse()

The Date module of the DataType Utility allows you to take a data value and convert it to a number. The parse() method will accept any value supported by JavaScript's Date() constructor.

To convert a data value to a date, simply call the parse() function of the DataType.Date class:

Under the hood, the data value is converted to a date via the Date() constructor:

Copyright © 2009 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings