File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
core/engine/src/builtins/temporal/instant Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -664,8 +664,11 @@ impl Instant {
664664 ///
665665 /// [spec]: https://tc39.es/proposal-temporal/#sec-temporal.instant.tolocalestring
666666 /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/toLocaleString
667- fn to_locale_string ( this : & JsValue , _: & [ JsValue ] , context : & mut Context ) -> JsResult < JsValue > {
668- // TODO: Update for ECMA-402 compliance
667+ fn to_locale_string (
668+ this : & JsValue ,
669+ args : & [ JsValue ] ,
670+ context : & mut Context ,
671+ ) -> JsResult < JsValue > {
669672 let object = this. as_object ( ) ;
670673 let instant = object
671674 . as_ref ( )
@@ -675,11 +678,15 @@ impl Instant {
675678 . with_message ( "the this object must be a Temporal.Instant object." )
676679 } ) ?;
677680
681+ let _locales = args. get_or_undefined ( 0 ) ;
682+ let _options = args. get_or_undefined ( 1 ) ;
683+
678684 let ixdtf = instant. inner . to_ixdtf_string_with_provider (
679685 None ,
680686 ToStringRoundingOptions :: default ( ) ,
681687 context. timezone_provider ( ) ,
682688 ) ?;
689+
683690 Ok ( JsString :: from ( ixdtf) . into ( ) )
684691 }
685692
You can’t perform that action at this time.
0 commit comments