1 export function createDate (y, m, d, h, M, s, ms) {
2 //can't just apply() to create a date:
3 //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
4 var date = new Date(y, m, d, h, M, s, ms);
6 //the date constructor remaps years 0-99 to 1900-1999
7 if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
13 export function createUTCDate (y) {
14 var date = new Date(Date.UTC.apply(null, arguments));
16 //the Date.UTC function remaps years 0-99 to 1900-1999
17 if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
18 date.setUTCFullYear(y);