(y)
| 1291 | } |
| 1292 | |
| 1293 | function createUTCDate(y) { |
| 1294 | var date, args; |
| 1295 | // the Date.UTC function remaps years 0-99 to 1900-1999 |
| 1296 | if (y < 100 && y >= 0) { |
| 1297 | args = Array.prototype.slice.call(arguments); |
| 1298 | // preserve leap years using a full 400 year cycle, then reset |
| 1299 | args[0] = y + 400; |
| 1300 | date = new Date(Date.UTC.apply(null, args)); |
| 1301 | if (isFinite(date.getUTCFullYear())) { |
| 1302 | date.setUTCFullYear(y); |
| 1303 | } |
| 1304 | } else { |
| 1305 | date = new Date(Date.UTC.apply(null, arguments)); |
| 1306 | } |
| 1307 | |
| 1308 | return date; |
| 1309 | } |
| 1310 | |
| 1311 | // start-of-first-week - start-of-year |
| 1312 | function firstWeekOffset(year, dow, doy) { |
no test coverage detected