@@ -257,7 +257,7 @@ addToLibrary({
257
257
} ,
258
258
259
259
strptime__deps: [ '$isLeapYear' , '$arraySum' , '$addDays' , '$MONTH_DAYS_REGULAR' , '$MONTH_DAYS_LEAP' ,
260
- '$jstoi_q' , '$ intArrayFromString' ] ,
260
+ '$intArrayFromString' ] ,
261
261
strptime : ( buf , format , tm ) = > {
262
262
// char *strptime(const char *restrict buf, const char *restrict format, struct tm *restrict tm);
263
263
// http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html
@@ -362,21 +362,21 @@ addToLibrary({
362
362
363
363
// seconds
364
364
if ( ( value = getMatch ( 'S' ) ) ) {
365
- date . sec = jstoi_q ( value ) ;
365
+ date . sec = Number ( value ) ;
366
366
}
367
367
368
368
// minutes
369
369
if ( ( value = getMatch ( 'M' ) ) ) {
370
- date . min = jstoi_q ( value ) ;
370
+ date . min = Number ( value ) ;
371
371
}
372
372
373
373
// hours
374
374
if ( ( value = getMatch ( 'H' ) ) ) {
375
375
// 24h clock
376
- date . hour = jstoi_q ( value ) ;
376
+ date . hour = Number ( value ) ;
377
377
} else if ( ( value = getMatch ( 'I' ) ) ) {
378
378
// AM/PM clock
379
- var hour = jstoi_q ( value ) ;
379
+ var hour = Number ( value ) ;
380
380
if ( ( value = getMatch ( 'p' ) ) ) {
381
381
hour += value . toUpperCase ( ) [ 0 ] === 'P' ? 12 : 0 ;
382
382
}
@@ -386,13 +386,13 @@ addToLibrary({
386
386
// year
387
387
if ( ( value = getMatch ( 'Y' ) ) ) {
388
388
// parse from four-digit year
389
- date . year = jstoi_q ( value ) ;
389
+ date . year = Number ( value ) ;
390
390
} else if ( ( value = getMatch ( 'y' ) ) ) {
391
391
// parse from two-digit year...
392
- var year = jstoi_q ( value ) ;
392
+ var year = Number ( value ) ;
393
393
if ( ( value = getMatch ( 'C' ) ) ) {
394
394
// ...and century
395
- year += jstoi_q ( value ) * 100 ;
395
+ year += Number ( value ) * 100 ;
396
396
} else {
397
397
// ...and rule-of-thumb
398
398
year += year < 69 ? 2000 : 1900 ;
@@ -403,7 +403,7 @@ addToLibrary({
403
403
// month
404
404
if ( ( value = getMatch ( 'm' ) ) ) {
405
405
// parse from month number
406
- date . month = jstoi_q ( value ) - 1 ;
406
+ date . month = Number ( value ) - 1 ;
407
407
} else if ( ( value = getMatch ( 'b' ) ) ) {
408
408
// parse from month name
409
409
date . month = MONTH_NUMBERS [ value . substring ( 0 , 3 ) . toUpperCase ( ) ] || 0 ;
@@ -413,10 +413,10 @@ addToLibrary({
413
413
// day
414
414
if ( ( value = getMatch ( 'd' ) ) ) {
415
415
// get day of month directly
416
- date . day = jstoi_q ( value ) ;
416
+ date . day = Number ( value ) ;
417
417
} else if ( ( value = getMatch ( 'j' ) ) ) {
418
418
// get day of month from day of year ...
419
- var day = jstoi_q ( value ) ;
419
+ var day = Number ( value ) ;
420
420
var leapYear = isLeapYear ( date . year ) ;
421
421
for ( var month = 0 ; month < 12 ; ++ month ) {
422
422
var daysUntilMonth = arraySum ( leapYear ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR , month - 1 ) ;
@@ -432,7 +432,7 @@ addToLibrary({
432
432
// Week number of the year (Sunday as the first day of the week) as a decimal number [00,53].
433
433
// All days in a new year preceding the first Sunday are considered to be in week 0.
434
434
var weekDayNumber = DAY_NUMBERS_SUN_FIRST [ weekDay ] ;
435
- var weekNumber = jstoi_q ( value ) ;
435
+ var weekNumber = Number ( value ) ;
436
436
437
437
// January 1st
438
438
var janFirst = new Date ( date . year , 0 , 1 ) ;
@@ -451,7 +451,7 @@ addToLibrary({
451
451
// Week number of the year (Monday as the first day of the week) as a decimal number [00,53].
452
452
// All days in a new year preceding the first Monday are considered to be in week 0.
453
453
var weekDayNumber = DAY_NUMBERS_MON_FIRST [ weekDay ] ;
454
- var weekNumber = jstoi_q ( value ) ;
454
+ var weekNumber = Number ( value ) ;
455
455
456
456
// January 1st
457
457
var janFirst = new Date ( date . year , 0 , 1 ) ;
0 commit comments