Sha256: f388a023120df9a67258be7a2b82c52edf0a4afc9fd2bcd33cfaad6404702c95
Contents?: true
Size: 1.02 KB
Versions: 17
Compression:
Stored size: 1.02 KB
Contents
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2009 Apple Inc. and contributors. // License: Licened under MIT license (see license.js) // ========================================================================== /*global module test equals context ok same */ module("SC.Validator.Date"); test("Converts into date if a value is given",function(){ var num = 1234947136000; // represents time in secs var c = SC.Validator.Date.fieldValueForObject(1234947136000,'',''); equals(YES,c === "Feb 18, 2009 12:52:16 AM","Number converted to date format"); }); test("Converts into number when date string is given", function(){ var da = "Feb 18, 2009 12:52:16 AM"; // date string var d = SC.Validator.Date.objectForFieldValue("Feb 18, 2009 12:52:16 AM",'',''); equals(YES,d === 1234947136000,"Date String compared with value in seconds"); equals(YES,SC.typeOf(d) == "number","Number is obtained"); });
Version data entries
17 entries across 17 versions & 2 rubygems