From 54316d094b089e3ee153b4e698637bd07a552ba5 Mon Sep 17 00:00:00 2001 From: Kevin Ness <46825870+nekevss@users.noreply.github.com> Date: Tue, 21 Jan 2025 20:06:29 -0600 Subject: [PATCH] Fix truncation on max microseconds and nanoseconds --- core/engine/src/builtins/temporal/duration/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/engine/src/builtins/temporal/duration/mod.rs b/core/engine/src/builtins/temporal/duration/mod.rs index 5bd4fd89505..69237a4ebd7 100644 --- a/core/engine/src/builtins/temporal/duration/mod.rs +++ b/core/engine/src/builtins/temporal/duration/mod.rs @@ -1024,7 +1024,7 @@ pub(crate) fn to_temporal_partial_duration( .map(|v| { let finite = v.to_finitef64(context)?; let integral_int = finite - .as_integer_if_integral::() + .as_integer_if_integral::() .map_err(JsError::from)?; integral_int.try_into().map_err(JsError::from) }) @@ -1076,7 +1076,7 @@ pub(crate) fn to_temporal_partial_duration( .map(|v| { let finite = v.to_finitef64(context)?; let integral_int = finite - .as_integer_if_integral::() + .as_integer_if_integral::() .map_err(JsError::from)?; integral_int.try_into().map_err(JsError::from) })