We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55a3fcd commit 1b39988Copy full SHA for 1b39988
lib/ecmascript.ts
@@ -956,8 +956,8 @@ export function ToSecondsStringPrecision(options: Temporal.ToStringPrecisionOpti
956
if (stringDigits === 'auto') return { precision: 'auto', unit: 'nanosecond', increment: 1 };
957
throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${stringDigits}`);
958
}
959
- const precision = ToInteger(digits);
960
- if (!NumberIsFinite(digits) || precision < 0 || precision > 9) {
+ const precision = MathTrunc(digits);
+ if (!NumberIsFinite(precision) || precision < 0 || precision > 9) {
961
throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${digits}`);
962
963
switch (precision) {
0 commit comments