Wijmo UI for the Web
parseDate Method
wijmo.input Namespace > IFormatValidateLib Interface : parseDate Method
The string value to parse.
The date format to use. For more information about format keywords, please see Format Function Library.
The culture that the parsing library uses.
Parse the string value to a javascript Date object.
Syntax
var instance; // Type: wijmo.input.IFormatValidateLib;
var returnValue; // Type: Date

// Parameters
var value; // Type:  string
var format; // Type:  string
var culture; // Type:  string

returnValue = instance.parseDate(value, format, culture);
function parseDate( 
   value : string,
   format : string,
   culture : string
) : Date;

Parameters

value
The string value to parse.
format
The date format to use. For more information about format keywords, please see Format Function Library.
culture
The culture that the parsing library uses.

Return Value

Returns a parsed date object.
Example
$.wijinputcore.parseDate("9/12/2013");  // returns: new Date(2013,8,12)
$.wijinputcore.parseDate("2013/09/12", "yyyy/MM/dd", "ja-JP");  //  returns: new Date(2013,8,12)
$.wijinputcore.parseDate("午後 11:22:33", "tt hh:mm:ss", "ja-JP");  //  returns: new Date(new Date().getFullYear(),0,1,23,22,33)
$.wijinputcore.parseDate("00:12:12", "HH:mm:ss", "ja-JP");   // returns: new Date(new Date().getFullYear(),0,1,0,12,12)
Remarks
For more information, see Parsing Function Library.
See Also

Reference

IFormatValidateLib Interface