@@ -376,7 +376,7 @@ export const ES = ObjectAssign({}, ES2020, {
376376 let minutes = ES . ToInteger ( match [ 8 ] ) * sign ;
377377 let fMinutes = match [ 9 ] ;
378378 let seconds = ES . ToInteger ( match [ 10 ] ) * sign ;
379- let fSeconds = match [ 11 ] + '000000000' ;
379+ const fSeconds = match [ 11 ] + '000000000' ;
380380 let milliseconds = ES . ToInteger ( fSeconds . slice ( 0 , 3 ) ) * sign ;
381381 let microseconds = ES . ToInteger ( fSeconds . slice ( 3 , 6 ) ) * sign ;
382382 let nanoseconds = ES . ToInteger ( fSeconds . slice ( 6 , 9 ) ) * sign ;
@@ -509,7 +509,7 @@ export const ES = ObjectAssign({}, ES2020, {
509509 ] . forEach ( ( val ) => {
510510 if ( val !== 0 ) throw new RangeError ( 'only the smallest unit can be fractional' ) ;
511511 } ) ;
512- let mins = fHours * 60 ;
512+ const mins = fHours * 60 ;
513513 minutes = MathTrunc ( mins ) ;
514514 fMinutes = mins % 1 ;
515515 }
@@ -520,7 +520,7 @@ export const ES = ObjectAssign({}, ES2020, {
520520 if ( val !== 0 ) throw new RangeError ( 'only the smallest unit can be fractional' ) ;
521521 }
522522 ) ;
523- let secs = fMinutes * 60 ;
523+ const secs = fMinutes * 60 ;
524524 seconds = MathTrunc ( secs ) ;
525525 fSeconds = secs % 1 ;
526526 }
@@ -529,7 +529,7 @@ export const ES = ObjectAssign({}, ES2020, {
529529 [ milliseconds , fMilliseconds , microseconds , fMicroseconds , nanoseconds , fNanoseconds ] . forEach ( ( val ) => {
530530 if ( val !== 0 ) throw new RangeError ( 'only the smallest unit can be fractional' ) ;
531531 } ) ;
532- let mils = fSeconds * 1000 ;
532+ const mils = fSeconds * 1000 ;
533533 milliseconds = MathTrunc ( mils ) ;
534534 fMilliseconds = mils % 1 ;
535535 }
@@ -538,7 +538,7 @@ export const ES = ObjectAssign({}, ES2020, {
538538 [ microseconds , fMicroseconds , nanoseconds , fNanoseconds ] . forEach ( ( val ) => {
539539 if ( val !== 0 ) throw new RangeError ( 'only the smallest unit can be fractional' ) ;
540540 } ) ;
541- let mics = fMilliseconds * 1000 ;
541+ const mics = fMilliseconds * 1000 ;
542542 microseconds = MathTrunc ( mics ) ;
543543 fMicroseconds = mics % 1 ;
544544 }
@@ -547,7 +547,7 @@ export const ES = ObjectAssign({}, ES2020, {
547547 [ nanoseconds , fNanoseconds ] . forEach ( ( val ) => {
548548 if ( val !== 0 ) throw new RangeError ( 'only the smallest unit can be fractional' ) ;
549549 } ) ;
550- let nans = fMicroseconds * 1000 ;
550+ const nans = fMicroseconds * 1000 ;
551551 nanoseconds = MathTrunc ( nans ) ;
552552 }
553553
@@ -591,7 +591,7 @@ export const ES = ObjectAssign({}, ES2020, {
591591 }
592592 ) ;
593593 if ( ! props ) throw new TypeError ( 'invalid duration-like' ) ;
594- let {
594+ const {
595595 years = 0 ,
596596 months = 0 ,
597597 weeks = 0 ,
@@ -684,7 +684,7 @@ export const ES = ObjectAssign({}, ES2020, {
684684 return ES . ToTemporalRoundingIncrement ( options , maximumIncrements [ smallestUnit ] , false ) ;
685685 } ,
686686 ToSecondsStringPrecision : ( options ) => {
687- let smallestUnit = ES . ToSmallestTemporalUnit ( options , undefined , [ 'year' , 'month' , 'week' , 'day' , 'hour' ] ) ;
687+ const smallestUnit = ES . ToSmallestTemporalUnit ( options , undefined , [ 'year' , 'month' , 'week' , 'day' , 'hour' ] ) ;
688688 switch ( smallestUnit ) {
689689 case 'minute' :
690690 return { precision : 'minute' , unit : 'minute' , increment : 1 } ;
@@ -1043,7 +1043,7 @@ export const ES = ObjectAssign({}, ES2020, {
10431043 return ES . DateFromFields ( calendar , fields , options ) ;
10441044 }
10451045 ES . ToTemporalOverflow ( options ) ; // validate and ignore
1046- let { year, month, day, calendar } = ES . ParseTemporalDateString ( ES . ToString ( item ) ) ;
1046+ const { year, month, day, calendar } = ES . ParseTemporalDateString ( ES . ToString ( item ) ) ;
10471047 const TemporalPlainDate = GetIntrinsic ( '%Temporal.PlainDate%' ) ;
10481048 return new TemporalPlainDate ( year , month , day , calendar ) ; // include validation
10491049 } ,
@@ -1850,7 +1850,7 @@ export const ES = ObjectAssign({}, ES2020, {
18501850 }
18511851 } ,
18521852 GetPossibleInstantsFor : ( timeZone , dateTime ) => {
1853- let getPossibleInstantsFor = ES . GetMethod ( timeZone , 'getPossibleInstantsFor' ) ;
1853+ const getPossibleInstantsFor = ES . GetMethod ( timeZone , 'getPossibleInstantsFor' ) ;
18541854 const possibleInstants = ES . Call ( getPossibleInstantsFor , timeZone , [ dateTime ] ) ;
18551855 const result = [ ] ;
18561856 for ( const instant of possibleInstants ) {
@@ -1864,8 +1864,8 @@ export const ES = ObjectAssign({}, ES2020, {
18641864 ISOYearString : ( year ) => {
18651865 let yearString ;
18661866 if ( year < 1000 || year > 9999 ) {
1867- let sign = year < 0 ? '-' : '+' ;
1868- let yearNumber = MathAbs ( year ) ;
1867+ const sign = year < 0 ? '-' : '+' ;
1868+ const yearNumber = MathAbs ( year ) ;
18691869 yearString = sign + `000000${ yearNumber } ` . slice ( - 6 ) ;
18701870 } else {
18711871 yearString = `${ year } ` ;
@@ -1956,7 +1956,7 @@ export const ES = ObjectAssign({}, ES2020, {
19561956 ( { quotient : total , remainder : ns } = total . divmod ( 1000 ) ) ;
19571957 ( { quotient : total , remainder : µs } = total . divmod ( 1000 ) ) ;
19581958 ( { quotient : seconds , remainder : ms } = total . divmod ( 1000 ) ) ;
1959- let fraction = MathAbs ( ms . toJSNumber ( ) ) * 1e6 + MathAbs ( µs . toJSNumber ( ) ) * 1e3 + MathAbs ( ns . toJSNumber ( ) ) ;
1959+ const fraction = MathAbs ( ms . toJSNumber ( ) ) * 1e6 + MathAbs ( µs . toJSNumber ( ) ) * 1e3 + MathAbs ( ns . toJSNumber ( ) ) ;
19601960 let decimalPart ;
19611961 if ( precision === 'auto' ) {
19621962 if ( fraction !== 0 ) {
@@ -2179,7 +2179,7 @@ export const ES = ObjectAssign({}, ES2020, {
21792179 GetIANATimeZoneNextTransition : ( epochNanoseconds , id ) => {
21802180 const uppercap = ES . SystemUTCEpochNanoSeconds ( ) + 366 * DAYMILLIS * 1e6 ;
21812181 let leftNanos = epochNanoseconds ;
2182- let leftOffsetNs = ES . GetIANATimeZoneOffsetNanoseconds ( leftNanos , id ) ;
2182+ const leftOffsetNs = ES . GetIANATimeZoneOffsetNanoseconds ( leftNanos , id ) ;
21832183 let rightNanos = leftNanos ;
21842184 let rightOffsetNs = leftOffsetNs ;
21852185 while ( leftOffsetNs === rightOffsetNs && bigInt ( leftNanos ) . compare ( uppercap ) === - 1 ) {
@@ -2202,7 +2202,7 @@ export const ES = ObjectAssign({}, ES2020, {
22022202 GetIANATimeZonePreviousTransition : ( epochNanoseconds , id ) => {
22032203 const lowercap = BEFORE_FIRST_DST ; // 1847-01-01T00:00:00Z
22042204 let rightNanos = bigInt ( epochNanoseconds ) . minus ( 1 ) ;
2205- let rightOffsetNs = ES . GetIANATimeZoneOffsetNanoseconds ( rightNanos , id ) ;
2205+ const rightOffsetNs = ES . GetIANATimeZoneOffsetNanoseconds ( rightNanos , id ) ;
22062206 let leftNanos = rightNanos ;
22072207 let leftOffsetNs = rightOffsetNs ;
22082208 while ( rightOffsetNs === leftOffsetNs && bigInt ( rightNanos ) . compare ( lowercap ) === 1 ) {
@@ -2240,7 +2240,7 @@ export const ES = ObjectAssign({}, ES2020, {
22402240 } ;
22412241 } ,
22422242 GetIANATimeZoneEpochValue : ( id , year , month , day , hour , minute , second , millisecond , microsecond , nanosecond ) => {
2243- let ns = ES . GetEpochFromISOParts ( year , month , day , hour , minute , second , millisecond , microsecond , nanosecond ) ;
2243+ const ns = ES . GetEpochFromISOParts ( year , month , day , hour , minute , second , millisecond , microsecond , nanosecond ) ;
22442244 if ( ns === null ) throw new RangeError ( 'DateTime outside of supported range' ) ;
22452245 const dayNanos = bigInt ( DAYMILLIS ) . multiply ( 1e6 ) ;
22462246 let nsEarlier = ns . minus ( dayNanos ) ;
@@ -2310,9 +2310,9 @@ export const ES = ObjectAssign({}, ES2020, {
23102310 return days ;
23112311 } ,
23122312 WeekOfYear : ( year , month , day ) => {
2313- let doy = ES . DayOfYear ( year , month , day ) ;
2314- let dow = ES . DayOfWeek ( year , month , day ) || 7 ;
2315- let doj = ES . DayOfWeek ( year , 1 , 1 ) ;
2313+ const doy = ES . DayOfYear ( year , month , day ) ;
2314+ const dow = ES . DayOfWeek ( year , month , day ) || 7 ;
2315+ const doj = ES . DayOfWeek ( year , 1 , 1 ) ;
23162316
23172317 const week = MathFloor ( ( doy - dow + 10 ) / 7 ) ;
23182318
@@ -2415,7 +2415,7 @@ export const ES = ObjectAssign({}, ES2020, {
24152415 hour += MathFloor ( minute / 60 ) ;
24162416 minute = ES . NonNegativeModulo ( minute , 60 ) ;
24172417
2418- let deltaDays = MathFloor ( hour / 24 ) ;
2418+ const deltaDays = MathFloor ( hour / 24 ) ;
24192419 hour = ES . NonNegativeModulo ( hour , 24 ) ;
24202420
24212421 return { deltaDays, hour, minute, second, millisecond, microsecond, nanosecond } ;
@@ -3180,14 +3180,14 @@ export const ES = ObjectAssign({}, ES2020, {
31803180 largestUnit ,
31813181 options
31823182 ) ;
3183- let intermediateNs = ES . AddZonedDateTime ( start , timeZone , calendar , years , months , weeks , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) ;
3183+ const intermediateNs = ES . AddZonedDateTime ( start , timeZone , calendar , years , months , weeks , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) ;
31843184 // may disambiguate
31853185 let timeRemainderNs = ns2 . subtract ( intermediateNs ) ;
31863186 const intermediate = ES . CreateTemporalZonedDateTime ( intermediateNs , timeZone , calendar ) ;
31873187 ( { nanoseconds : timeRemainderNs , days } = ES . NanosecondsToDays ( timeRemainderNs , intermediate ) ) ;
31883188
31893189 // Finally, merge the date and time durations and return the merged result.
3190- let { hours, minutes, seconds, milliseconds, microseconds, nanoseconds } = ES . BalanceDuration (
3190+ const { hours, minutes, seconds, milliseconds, microseconds, nanoseconds } = ES . BalanceDuration (
31913191 0 ,
31923192 0 ,
31933193 0 ,
@@ -3496,7 +3496,7 @@ export const ES = ObjectAssign({}, ES2020, {
34963496
34973497 // RFC 5545 requires the date portion to be added in calendar days and the
34983498 // time portion to be added in exact time.
3499- let dt = ES . BuiltinTimeZoneGetPlainDateTimeFor ( timeZone , instant , calendar ) ;
3499+ const dt = ES . BuiltinTimeZoneGetPlainDateTimeFor ( timeZone , instant , calendar ) ;
35003500 const datePart = ES . CreateTemporalDate (
35013501 GetSlot ( dt , ISO_YEAR ) ,
35023502 GetSlot ( dt , ISO_MONTH ) ,
@@ -4155,7 +4155,7 @@ function bisect(getState, left, right, lstate = getState(left), rstate = getStat
41554155 left = bigInt ( left ) ;
41564156 right = bigInt ( right ) ;
41574157 while ( right . minus ( left ) . greater ( 1 ) ) {
4158- let middle = left . plus ( right ) . divide ( 2 ) ;
4158+ const middle = left . plus ( right ) . divide ( 2 ) ;
41594159 const mstate = getState ( middle ) ;
41604160 if ( mstate === lstate ) {
41614161 left = middle ;
0 commit comments