@@ -257,7 +257,7 @@ addToLibrary({
257257 } ,
258258
259259 strptime__deps: [ '$isLeapYear' , '$arraySum' , '$addDays' , '$MONTH_DAYS_REGULAR' , '$MONTH_DAYS_LEAP' ,
260- '$jstoi_q' , '$ intArrayFromString' ] ,
260+ '$intArrayFromString' ] ,
261261 strptime : ( buf , format , tm ) = > {
262262 // char *strptime(const char *restrict buf, const char *restrict format, struct tm *restrict tm);
263263 // http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html
@@ -362,21 +362,21 @@ addToLibrary({
362362
363363 // seconds
364364 if ( ( value = getMatch ( 'S' ) ) ) {
365- date . sec = jstoi_q ( value ) ;
365+ date . sec = Number ( value ) ;
366366 }
367367
368368 // minutes
369369 if ( ( value = getMatch ( 'M' ) ) ) {
370- date . min = jstoi_q ( value ) ;
370+ date . min = Number ( value ) ;
371371 }
372372
373373 // hours
374374 if ( ( value = getMatch ( 'H' ) ) ) {
375375 // 24h clock
376- date . hour = jstoi_q ( value ) ;
376+ date . hour = Number ( value ) ;
377377 } else if ( ( value = getMatch ( 'I' ) ) ) {
378378 // AM/PM clock
379- var hour = jstoi_q ( value ) ;
379+ var hour = Number ( value ) ;
380380 if ( ( value = getMatch ( 'p' ) ) ) {
381381 hour += value . toUpperCase ( ) [ 0 ] === 'P' ? 12 : 0 ;
382382 }
@@ -386,13 +386,13 @@ addToLibrary({
386386 // year
387387 if ( ( value = getMatch ( 'Y' ) ) ) {
388388 // parse from four-digit year
389- date . year = jstoi_q ( value ) ;
389+ date . year = Number ( value ) ;
390390 } else if ( ( value = getMatch ( 'y' ) ) ) {
391391 // parse from two-digit year...
392- var year = jstoi_q ( value ) ;
392+ var year = Number ( value ) ;
393393 if ( ( value = getMatch ( 'C' ) ) ) {
394394 // ...and century
395- year += jstoi_q ( value ) * 100 ;
395+ year += Number ( value ) * 100 ;
396396 } else {
397397 // ...and rule-of-thumb
398398 year += year < 69 ? 2000 : 1900 ;
@@ -403,7 +403,7 @@ addToLibrary({
403403 // month
404404 if ( ( value = getMatch ( 'm' ) ) ) {
405405 // parse from month number
406- date . month = jstoi_q ( value ) - 1 ;
406+ date . month = Number ( value ) - 1 ;
407407 } else if ( ( value = getMatch ( 'b' ) ) ) {
408408 // parse from month name
409409 date . month = MONTH_NUMBERS [ value . substring ( 0 , 3 ) . toUpperCase ( ) ] || 0 ;
@@ -413,10 +413,10 @@ addToLibrary({
413413 // day
414414 if ( ( value = getMatch ( 'd' ) ) ) {
415415 // get day of month directly
416- date . day = jstoi_q ( value ) ;
416+ date . day = Number ( value ) ;
417417 } else if ( ( value = getMatch ( 'j' ) ) ) {
418418 // get day of month from day of year ...
419- var day = jstoi_q ( value ) ;
419+ var day = Number ( value ) ;
420420 var leapYear = isLeapYear ( date . year ) ;
421421 for ( var month = 0 ; month < 12 ; ++ month ) {
422422 var daysUntilMonth = arraySum ( leapYear ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR , month - 1 ) ;
@@ -432,7 +432,7 @@ addToLibrary({
432432 // Week number of the year (Sunday as the first day of the week) as a decimal number [00,53].
433433 // All days in a new year preceding the first Sunday are considered to be in week 0.
434434 var weekDayNumber = DAY_NUMBERS_SUN_FIRST [ weekDay ] ;
435- var weekNumber = jstoi_q ( value ) ;
435+ var weekNumber = Number ( value ) ;
436436
437437 // January 1st
438438 var janFirst = new Date ( date . year , 0 , 1 ) ;
@@ -451,7 +451,7 @@ addToLibrary({
451451 // Week number of the year (Monday as the first day of the week) as a decimal number [00,53].
452452 // All days in a new year preceding the first Monday are considered to be in week 0.
453453 var weekDayNumber = DAY_NUMBERS_MON_FIRST [ weekDay ] ;
454- var weekNumber = jstoi_q ( value ) ;
454+ var weekNumber = Number ( value ) ;
455455
456456 // January 1st
457457 var janFirst = new Date ( date . year , 0 , 1 ) ;
0 commit comments