(y, m, d, h, M, s, ms)
| 1273 | } |
| 1274 | |
| 1275 | function createDate(y, m, d, h, M, s, ms) { |
| 1276 | // can't just apply() to create a date: |
| 1277 | // https://stackoverflow.com/q/181348 |
| 1278 | var date; |
| 1279 | // the date constructor remaps years 0-99 to 1900-1999 |
| 1280 | if (y < 100 && y >= 0) { |
| 1281 | // preserve leap years using a full 400 year cycle, then reset |
| 1282 | date = new Date(y + 400, m, d, h, M, s, ms); |
| 1283 | if (isFinite(date.getFullYear())) { |
| 1284 | date.setFullYear(y); |
| 1285 | } |
| 1286 | } else { |
| 1287 | date = new Date(y, m, d, h, M, s, ms); |
| 1288 | } |
| 1289 | |
| 1290 | return date; |
| 1291 | } |
| 1292 | |
| 1293 | function createUTCDate(y) { |
| 1294 | var date, args; |
nothing calls this directly
no outgoing calls
no test coverage detected