var data;
if (key) {
if (typeof(values) !== "undefined") {
- moment.defineLocale(key, values);
+ data = moment.defineLocale(key, values);
+ }
+ else {
+ data = moment.localeData(key);
}
-
- data = moment.localeData(key);
if (data) {
moment.duration.fn._locale = moment.fn._locale = data;
locales[name] = new Locale();
}
locales[name].set(values);
- return locales[name]._abbr;
+ return locales[name];
} else {
delete locales[name];
return null;
test.equal(moment([2012, 0, 13]).format('w ww wo'), '2 02 2', "Jan 13 2012 should be week 2");
test.equal(moment([2012, 0, 14]).format('w ww wo'), '3 03 3', "Jan 14 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ar-ma'), 'ar-ma', "module should export ar-ma");
- }
test.done();
}
};
test.equal(moment([2012, 0, 13]).format('w ww wo'), '٢ ٠٢ ٢', "Jan 13 2012 should be week 2");
test.equal(moment([2012, 0, 14]).format('w ww wo'), '٣ ٠٣ ٣', "Jan 14 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ar-sa'), 'ar-sa', "module should export ar-sa");
- }
test.done();
}
};
test.equal(moment([2012, 0, 13]).format('w ww wo'), '٢ ٠٢ ٢', "Jan 13 2012 should be week 2");
test.equal(moment([2012, 0, 14]).format('w ww wo'), '٣ ٠٣ ٣', "Jan 14 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ar'), 'ar', "module should export ar");
- }
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), "2 02 2-nci", "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), "3 03 3-üncü", "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/az'), 'az', "module should export az");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2-ри', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3-ти', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/bg'), 'bg', "module should export bg");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '২ ০২ ২', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '৩ ০৩ ৩', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the localeuage" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/bn'), 'bn', "module should export bn");
- }
-
test.done();
}
};
test.equal(start.from(moment([2007, 1, 28]).add({y: 133}), true), "133 bloaz", "mutation 133 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 148}), true), "148 vloaz", "mutation 148 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 261}), true), "261 bloaz", "mutation 261 years");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/br'), 'br', "module should export br");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2.', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3.', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/bs'), 'bs', "module should export bs");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ca'), 'ca', "module should export ca");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/cs'), 'cs', "module should export cs");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2-мĕш', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3-мĕш', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/cv'), 'cv', "module should export cv");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2il', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2il', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the localeuage" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/cy'), 'cy', "module should export cy");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the localeuage" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/da'), 'da', "module should export da");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the localeuage": function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/de-at'), 'de-at', "module should export de-at");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the localeuage" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/de'), 'de', "module should export de");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2η', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2η', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the localeuage" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/el'), 'el', "module should export el");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2nd', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2nd', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/en-au'), 'en-au', "module should export en-au");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2nd', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3rd', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/en-ca'), 'en-ca', "module should export en-ca");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2nd', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2nd', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/en-gb'), 'en-gb', "module should export en-gb");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2a', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3a', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/eo'), 'eo', "module should export eo");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/es'), 'es', "module should export es");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/et'), 'et', "module should export et");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2.', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3.', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/eu'), 'eu', "module should export eu");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 13]).format('w ww wo'), '۲ ۰۲ ۲م', "Jan 13 2012 should be week 2");
test.equal(moment([2012, 0, 14]).format('w ww wo'), '۳ ۰۳ ۳م', "Jan 14 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/fa'), 'fa', "module should export fa");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/fi'), 'fi', "module should export fi");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/fo'), 'fo', "module should export fo");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/fr-ca'), 'fr-ca', "module should export fr-ca");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/fr'), 'fr', "module should export fr");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2º', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3º', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/gl'), 'gl', "module should export gl");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/he'), 'he', "module should export he");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '२ ०२ २', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '३ ०३ ३', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/hi'), 'hi', "module should export hi");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2.', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3.', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/hr'), 'hr', "module should export hr");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2.', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3.', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/hu'), 'hu', "module should export hu");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2-րդ', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3-րդ', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/hy-am'), 'hy-am', "module should export hy");
- }
-
test.done();
}
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/id'), 'id', "module should export id");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/is'), 'is', "module should export is");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/it'), 'it', "module should export it");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ja'), 'ja', "module should export ja");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 მე-2', "იან 8 2012 უნდა იყოს კვირა 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 მე-3', "იან 9 2012 უნდა იყოს კვირა 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ka'), 'ka', "module should export ka");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale": function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/km'), 'km', "module should export km");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2일', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3일', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ko'), 'ko', "module should export ko");
- }
-
test.done();
}
};
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format(datestring), "Today + " + i + " days end of day");
}
- test.done();
- },
-
- "returns the name of the locale": function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/lb'), 'lb', "module should export lb");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2-oji', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2-oji', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/lt'), 'lt', "module should export lt");
- }
-
test.done();
}
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/lv'), 'lv', "module should export lv");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2-ри', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3-ти', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/mk'), 'mk', "module should export mk");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ml'), 'ml', "module should export ml");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '२ ०२ २', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '३ ०३ ३', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/mr'), 'mr', "module should export mr");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '3 03 3', "Jan 14 2012 sepatutnya minggu 3");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3', "Jan 15 2012 sepatutnya minggu 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ms-my'), 'ms-my', "module should export ms-my");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/nb'), 'nb', "module should export nb");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '२ ०२ २', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '३ ०३ ३', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ne'), 'ne', "module should export ne");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2de', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2de', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/nl'), 'nl', "module should export nl");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/nn'), 'nn', "module should export nn");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/pl'), 'pl', "module should export pl");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2º', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3º', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/pt-br'), 'pt-br', "module should export pt-br");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/pt'), 'pt', "module should export pt");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ro'), 'ro', "module should export ro");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2-я', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3-я', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ru'), 'ru', "module should export ru");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/sk'), 'sk', "module should export sk");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2.', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3.', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/sl'), 'sl', "module should export sl");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/sq'), 'sq', "module should export sq");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2.', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3.', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/sr-cyrl'), 'sr-cyrl', "module should export sr-cyrl");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2.', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3.', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/sr'), 'sr', "module should export sr");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2a', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2a', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/sv'), 'sv', "module should export sv");
- }
-
test.done();
}
};
test.equal(moment([2011, 2, 23, 17, 30]).format('a'), " எற்பாடு", "evening");
test.equal(moment([2011, 2, 23, 19, 30]).format('a'), " மாலை", "late evening");
test.equal(moment([2011, 2, 23, 21, 20]).format('a'), " இரவு", "night");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/ta'), 'ta', "module should export ta");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3', "Jan 15 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/th'), 'th', "module should export th");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/tl-ph'), 'tl-ph', "module should export tl-ph");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), "2 02 2'nci", "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), "3 03 3'üncü", "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/tr'), 'tr', "module should export tr");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 13]).format('w ww wo'), '2 02 2', "Jan 13 2012 should be week 2");
test.equal(moment([2012, 0, 14]).format('w ww wo'), '3 03 3', "Jan 14 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/tzm-latn'), 'tzm-latn', "module should export tzm-latn");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 13]).format('w ww wo'), '2 02 2', "Jan 13 2012 should be week 2");
test.equal(moment([2012, 0, 14]).format('w ww wo'), '3 03 3', "Jan 14 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/tzm'), 'tzm', "module should export tzm");
- }
test.done();
}
};
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2-й', "Jan 8 2012 should be week 2");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3-й', "Jan 9 2012 should be week 3");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/uk'), 'uk', "module should export uk");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/uz'), 'uz', "module should export uz");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2', "Jan 15 2012 should be week 2");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/vi'), 'vi', "module should export vi");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 7]).format('w ww wo'), '1 01 1周', "Jan 7 2012 应该是第 1周");
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2周', "Jan 14 2012 应该是第 2周");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/zh-cn'), 'zh-cn', "module should export zh-cn");
- }
-
test.done();
}
};
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2週', "Jan 14 2012 應該是第 2週");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3週', "Jan 15 2012 應該是第 3週");
- test.done();
- },
-
- "returns the name of the locale" : function (test) {
- if (typeof module !== 'undefined' && module.exports) {
- test.equal(require('../../locale/zh-tw'), 'zh-tw', "module should export zh-tw");
- }
-
test.done();
}
};