- Author:
- David Nickerson <nickerso@users.sourceforge.net>
- Date:
- 2009-07-16 02:00:03+12:00
- Desc:
- the starting point for the HH tutorial example
- Permanent Source URI:
- https://models.fieldml.org/workspace/a1/rawfile/f6a8f90307388eb4b040ee3566b84d88b59247f7/dojo-presentation/js/dojo/dojox/date/tests/IslamicDate.js
dojo.provide("dojox.date.tests.IslamicDate");
dojo.require("dojox.date.IslamicDate");
dojo.require("dojo.date");
tests.register("dojox.date.tests.IslamicDate",
[
{
// Test formatting and parsing of dates in various locales pre-built in dojo.cldr
// NOTE: we can't set djConfig.extraLocale before bootstrapping unit tests, so directly
// load resources here for specific locales:
name: "date.locale",
setUp: function(){
var partLocaleList = ["en-us"];
dojo.forEach(partLocaleList, function(locale){
dojo.requireLocalization("dojo.cldr", "islamic", locale);
});
},
runTest: function(t){
},
tearDown: function(){
//Clean up bundles that should not exist if
//the test is re-run.
delete dojo.cldr.nls.islamic;
}
},
{
name: "toGregorian",
runTest: function(t){
var dateIslamic = new dojox.date.IslamicDate(1429,11,20); // Dec 19, 2008 -- is this right??
var dateGregorian = dateIslamic.toGregorian();
t.is(0, dojo.date.compare(new Date(2008, 11, 19), dateGregorian, "date"));
// add exhaustive tests here
}
}/*,
{
name: "fromGregorian",
runTest: function(t){
var dateIslamic = new dojox.date.IslamicDate();
var dateGregorian = new Date(2008,10,12);
dateIslamic.fromGregorian(dateGregorian);
t.is(0, dojo.date.compare(new Date(...), dateIslamic, "date"));
// add more tests here
}
}*/
]
);