Browse Source

Bump temporal_rs to latest commit (#3880)

* Bump temporal_rs to latest commit

* Fix build

* update test262

* bump temporal pt. 2

* bump temporal pt. 3

* bump temporal (last time)
pull/3882/head
José Julián Espina 5 months ago committed by GitHub
parent
commit
2458d73669
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 257
      Cargo.lock
  2. 2
      Cargo.toml
  3. 2
      core/engine/src/builtins/options.rs
  4. 7
      core/engine/src/builtins/temporal/duration/mod.rs
  5. 1
      core/engine/src/builtins/temporal/error.rs
  6. 8
      core/engine/src/builtins/temporal/instant/mod.rs
  7. 50
      core/engine/src/builtins/temporal/options.rs
  8. 64
      core/engine/src/builtins/temporal/time_zone/mod.rs
  9. 2
      test262_config.toml

257
Cargo.lock generated

@ -82,9 +82,9 @@ dependencies = [
[[package]] [[package]]
name = "anstyle-query" name = "anstyle-query"
version = "1.0.3" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391"
dependencies = [ dependencies = [
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
@ -132,7 +132,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a"
dependencies = [ dependencies = [
"concurrent-queue", "concurrent-queue",
"event-listener-strategy 0.5.2", "event-listener-strategy",
"futures-core", "futures-core",
"pin-project-lite", "pin-project-lite",
] ]
@ -163,9 +163,9 @@ dependencies = [
[[package]] [[package]]
name = "async-io" name = "async-io"
version = "2.3.2" version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964"
dependencies = [ dependencies = [
"async-lock", "async-lock",
"cfg-if", "cfg-if",
@ -173,7 +173,7 @@ dependencies = [
"futures-io", "futures-io",
"futures-lite 2.3.0", "futures-lite 2.3.0",
"parking", "parking",
"polling 3.7.0", "polling 3.7.2",
"rustix", "rustix",
"slab", "slab",
"tracing", "tracing",
@ -182,12 +182,12 @@ dependencies = [
[[package]] [[package]]
name = "async-lock" name = "async-lock"
version = "3.3.0" version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
dependencies = [ dependencies = [
"event-listener 4.0.3", "event-listener 5.3.1",
"event-listener-strategy 0.4.0", "event-listener-strategy",
"pin-project-lite", "pin-project-lite",
] ]
@ -204,9 +204,9 @@ dependencies = [
[[package]] [[package]]
name = "async-process" name = "async-process"
version = "2.2.2" version = "2.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a"
dependencies = [ dependencies = [
"async-channel 2.3.1", "async-channel 2.3.1",
"async-io", "async-io",
@ -215,7 +215,7 @@ dependencies = [
"async-task", "async-task",
"blocking", "blocking",
"cfg-if", "cfg-if",
"event-listener 5.3.0", "event-listener 5.3.1",
"futures-lite 2.3.0", "futures-lite 2.3.0",
"rustix", "rustix",
"tracing", "tracing",
@ -224,9 +224,9 @@ dependencies = [
[[package]] [[package]]
name = "async-signal" name = "async-signal"
version = "0.2.6" version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d"
dependencies = [ dependencies = [
"async-io", "async-io",
"async-lock", "async-lock",
@ -287,9 +287,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "2.5.0" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
dependencies = [ dependencies = [
"serde", "serde",
] ]
@ -312,12 +312,12 @@ name = "boa_ast"
version = "0.18.0" version = "0.18.0"
dependencies = [ dependencies = [
"arbitrary", "arbitrary",
"bitflags 2.5.0", "bitflags 2.6.0",
"boa_interner", "boa_interner",
"boa_macros", "boa_macros",
"indexmap", "indexmap",
"num-bigint", "num-bigint",
"rustc-hash", "rustc-hash 1.1.0",
"serde", "serde",
] ]
@ -345,7 +345,7 @@ name = "boa_engine"
version = "0.18.0" version = "0.18.0"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bitflags 2.5.0", "bitflags 2.6.0",
"boa_ast", "boa_ast",
"boa_gc", "boa_gc",
"boa_icu_provider", "boa_icu_provider",
@ -390,7 +390,7 @@ dependencies = [
"portable-atomic", "portable-atomic",
"rand", "rand",
"regress", "regress",
"rustc-hash", "rustc-hash 1.1.0",
"ryu-js", "ryu-js",
"serde", "serde",
"serde_json", "serde_json",
@ -460,7 +460,7 @@ dependencies = [
"indexmap", "indexmap",
"once_cell", "once_cell",
"phf", "phf",
"rustc-hash", "rustc-hash 1.1.0",
"serde", "serde",
"static_assertions", "static_assertions",
] ]
@ -472,7 +472,7 @@ dependencies = [
"boa_engine", "boa_engine",
"boa_gc", "boa_gc",
"boa_macros", "boa_macros",
"rustc-hash", "rustc-hash 1.1.0",
] ]
[[package]] [[package]]
@ -497,7 +497,7 @@ dependencies = [
name = "boa_parser" name = "boa_parser"
version = "0.18.0" version = "0.18.0"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.6.0",
"boa_ast", "boa_ast",
"boa_interner", "boa_interner",
"boa_macros", "boa_macros",
@ -507,7 +507,7 @@ dependencies = [
"num-bigint", "num-bigint",
"num-traits", "num-traits",
"regress", "regress",
"rustc-hash", "rustc-hash 1.1.0",
] ]
[[package]] [[package]]
@ -516,7 +516,7 @@ version = "0.18.0"
dependencies = [ dependencies = [
"measureme", "measureme",
"once_cell", "once_cell",
"rustc-hash", "rustc-hash 1.1.0",
] ]
[[package]] [[package]]
@ -526,7 +526,7 @@ dependencies = [
"boa_engine", "boa_engine",
"boa_gc", "boa_gc",
"indoc", "indoc",
"rustc-hash", "rustc-hash 1.1.0",
"textwrap", "textwrap",
] ]
@ -537,7 +537,7 @@ dependencies = [
"boa_macros", "boa_macros",
"fast-float", "fast-float",
"paste", "paste",
"rustc-hash", "rustc-hash 1.1.0",
"sptr", "sptr",
"static_assertions", "static_assertions",
] ]
@ -546,7 +546,7 @@ dependencies = [
name = "boa_tester" name = "boa_tester"
version = "0.18.0" version = "0.18.0"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.6.0",
"boa_engine", "boa_engine",
"boa_gc", "boa_gc",
"boa_runtime", "boa_runtime",
@ -557,7 +557,7 @@ dependencies = [
"comfy-table", "comfy-table",
"phf", "phf",
"rayon", "rayon",
"rustc-hash", "rustc-hash 1.1.0",
"serde", "serde",
"serde_json", "serde_json",
"serde_repr", "serde_repr",
@ -682,9 +682,9 @@ checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.98" version = "1.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" checksum = "c891175c3fb232128f48de6590095e59198bbeb8620c310be349bfc3afd12c7b"
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
@ -753,7 +753,7 @@ version = "4.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6"
dependencies = [ dependencies = [
"heck 0.5.0", "heck",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn", "syn",
@ -761,9 +761,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_lex" name = "clap_lex"
version = "0.7.0" version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70"
[[package]] [[package]]
name = "clipboard-win" name = "clipboard-win"
@ -954,7 +954,7 @@ version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.6.0",
"crossterm_winapi", "crossterm_winapi",
"libc", "libc",
"parking_lot", "parking_lot",
@ -1082,7 +1082,7 @@ dependencies = [
"lazy_static", "lazy_static",
"mintex", "mintex",
"parking_lot", "parking_lot",
"rustc-hash", "rustc-hash 1.1.0",
"serde", "serde",
"serde_json", "serde_json",
"thousands", "thousands",
@ -1090,9 +1090,9 @@ dependencies = [
[[package]] [[package]]
name = "displaydoc" name = "displaydoc"
version = "0.2.4" version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1174,43 +1174,22 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
[[package]] [[package]]
name = "event-listener" name = "event-listener"
version = "4.0.3" version = "5.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e"
dependencies = [
"concurrent-queue",
"parking",
"pin-project-lite",
]
[[package]]
name = "event-listener"
version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba"
dependencies = [ dependencies = [
"concurrent-queue", "concurrent-queue",
"parking", "parking",
"pin-project-lite", "pin-project-lite",
] ]
[[package]]
name = "event-listener-strategy"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3"
dependencies = [
"event-listener 4.0.3",
"pin-project-lite",
]
[[package]] [[package]]
name = "event-listener-strategy" name = "event-listener-strategy"
version = "0.5.2" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1"
dependencies = [ dependencies = [
"event-listener 5.3.0", "event-listener 5.3.1",
"pin-project-lite", "pin-project-lite",
] ]
@ -1437,12 +1416,6 @@ dependencies = [
"allocator-api2", "allocator-api2",
] ]
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]] [[package]]
name = "heck" name = "heck"
version = "0.5.0" version = "0.5.0"
@ -1455,6 +1428,12 @@ version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "hermit-abi"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
[[package]] [[package]]
name = "http" name = "http"
version = "0.2.12" version = "0.2.12"
@ -1492,9 +1471,9 @@ dependencies = [
[[package]] [[package]]
name = "icu_calendar" name = "icu_calendar"
version = "1.5.1" version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7defdcb785245edd773a38b56f0ccef39065cdc4509a7d85435f6edea0fd58c5" checksum = "7265b2137f9a36f7634a308d91f984574bbdba8cfd95ceffe1c345552275a8ff"
dependencies = [ dependencies = [
"calendrical_calculations", "calendrical_calculations",
"databake", "databake",
@ -1517,9 +1496,9 @@ checksum = "8e009b7f0151ee6fb28c40b1283594397e0b7183820793e9ace3dcd13db126d0"
[[package]] [[package]]
name = "icu_casemap" name = "icu_casemap"
version = "1.5.0" version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7701c9ff229dae365623cfb1b24c86552fe3a8e82877f9a75400b95452a9c02" checksum = "9ff0c8ae9f8d31b12e27fc385ff9ab1f3cd9b17417c665c49e4ec958c37da75f"
dependencies = [ dependencies = [
"databake", "databake",
"displaydoc", "displaydoc",
@ -1810,9 +1789,9 @@ dependencies = [
[[package]] [[package]]
name = "icu_properties" name = "icu_properties"
version = "1.5.0" version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
dependencies = [ dependencies = [
"databake", "databake",
"displaydoc", "displaydoc",
@ -1988,7 +1967,7 @@ version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
dependencies = [ dependencies = [
"hermit-abi", "hermit-abi 0.3.9",
"libc", "libc",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
@ -2050,6 +2029,15 @@ version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "ixdtf"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2123305f927452a9502fc05c33800280d90127c95c50eb45ec6b3c50346afbf3"
dependencies = [
"displaydoc",
]
[[package]] [[package]]
name = "jemalloc-sys" name = "jemalloc-sys"
version = "0.5.4+5.3.0-patched" version = "0.5.4+5.3.0-patched"
@ -2081,9 +2069,9 @@ dependencies = [
[[package]] [[package]]
name = "lazy_static" name = "lazy_static"
version = "1.4.0" version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]] [[package]]
name = "libc" name = "libc"
@ -2170,15 +2158,15 @@ dependencies = [
"memmap2", "memmap2",
"parking_lot", "parking_lot",
"perf-event-open-sys", "perf-event-open-sys",
"rustc-hash", "rustc-hash 1.1.0",
"smallvec", "smallvec",
] ]
[[package]] [[package]]
name = "memchr" name = "memchr"
version = "2.7.2" version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]] [[package]]
name = "memmap2" name = "memmap2"
@ -2206,9 +2194,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]] [[package]]
name = "miniz_oxide" name = "miniz_oxide"
version = "0.7.3" version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
dependencies = [ dependencies = [
"adler", "adler",
] ]
@ -2238,7 +2226,7 @@ version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.6.0",
"cfg-if", "cfg-if",
"cfg_aliases", "cfg_aliases",
"libc", "libc",
@ -2306,7 +2294,7 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [ dependencies = [
"hermit-abi", "hermit-abi 0.3.9",
"libc", "libc",
] ]
@ -2515,9 +2503,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]] [[package]]
name = "piper" name = "piper"
version = "0.2.2" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391"
dependencies = [ dependencies = [
"atomic-waker", "atomic-waker",
"fastrand 2.1.0", "fastrand 2.1.0",
@ -2576,13 +2564,13 @@ dependencies = [
[[package]] [[package]]
name = "polling" name = "polling"
version = "3.7.0" version = "3.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"concurrent-queue", "concurrent-queue",
"hermit-abi", "hermit-abi 0.4.0",
"pin-project-lite", "pin-project-lite",
"rustix", "rustix",
"tracing", "tracing",
@ -2709,11 +2697,11 @@ dependencies = [
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.5.1" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.6.0",
] ]
[[package]] [[package]]
@ -2724,8 +2712,8 @@ checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
"regex-automata 0.4.6", "regex-automata 0.4.7",
"regex-syntax 0.8.3", "regex-syntax 0.8.4",
] ]
[[package]] [[package]]
@ -2740,13 +2728,13 @@ dependencies = [
[[package]] [[package]]
name = "regex-automata" name = "regex-automata"
version = "0.4.6" version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
"regex-syntax 0.8.3", "regex-syntax 0.8.4",
] ]
[[package]] [[package]]
@ -2757,9 +2745,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.8.3" version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
[[package]] [[package]]
name = "regress" name = "regress"
@ -2798,13 +2786,19 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustc-hash"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "0.38.34" version = "0.38.34"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.6.0",
"errno", "errno",
"libc", "libc",
"linux-raw-sys", "linux-raw-sys",
@ -2854,7 +2848,7 @@ version = "14.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7803e8936da37efd9b6d4478277f4b2b9bb5cdb37a113e8d63222e58da647e63" checksum = "7803e8936da37efd9b6d4478277f4b2b9bb5cdb37a113e8d63222e58da647e63"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.6.0",
"cfg-if", "cfg-if",
"clipboard-win", "clipboard-win",
"fd-lock", "fd-lock",
@ -2972,9 +2966,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.117" version = "1.0.118"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",
@ -3144,17 +3138,17 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]] [[package]]
name = "strum" name = "strum"
version = "0.26.2" version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
[[package]] [[package]]
name = "strum_macros" name = "strum_macros"
version = "0.26.2" version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
dependencies = [ dependencies = [
"heck 0.4.1", "heck",
"proc-macro2", "proc-macro2",
"quote", "quote",
"rustversion", "rustversion",
@ -3163,9 +3157,9 @@ dependencies = [
[[package]] [[package]]
name = "subtle" name = "subtle"
version = "2.5.0" version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]] [[package]]
name = "syn" name = "syn"
@ -3207,13 +3201,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]] [[package]]
name = "temporal_rs" name = "temporal_rs"
version = "0.0.2" version = "0.0.2"
source = "git+https://github.com/boa-dev/temporal.git?rev=61a05fbb7c72353deda72a3df0e6887d65b840d2#61a05fbb7c72353deda72a3df0e6887d65b840d2" source = "git+https://github.com/boa-dev/temporal.git?rev=ec2f2d00294ee641285ec1570df6683ecd0d1a8e#ec2f2d00294ee641285ec1570df6683ecd0d1a8e"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.6.0",
"icu_calendar", "icu_calendar",
"ixdtf",
"num-bigint", "num-bigint",
"num-traits", "num-traits",
"rustc-hash", "rustc-hash 2.0.0",
"tinystr", "tinystr",
] ]
@ -3370,9 +3365,9 @@ dependencies = [
[[package]] [[package]]
name = "tinyvec" name = "tinyvec"
version = "1.6.0" version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82"
dependencies = [ dependencies = [
"tinyvec_macros", "tinyvec_macros",
] ]
@ -3434,7 +3429,7 @@ dependencies = [
"serde", "serde",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime",
"winnow 0.6.9", "winnow 0.6.13",
] ]
[[package]] [[package]]
@ -3561,9 +3556,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
[[package]] [[package]]
name = "unicode-width" name = "unicode-width"
version = "0.1.12" version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
[[package]] [[package]]
name = "unsafe-libyaml" name = "unsafe-libyaml"
@ -3596,9 +3591,9 @@ dependencies = [
[[package]] [[package]]
name = "url" name = "url"
version = "2.5.0" version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
dependencies = [ dependencies = [
"form_urlencoded", "form_urlencoded",
"idna", "idna",
@ -3619,9 +3614,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]] [[package]]
name = "utf8parse" name = "utf8parse"
version = "0.2.1" version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]] [[package]]
name = "valuable" name = "valuable"
@ -3816,9 +3811,9 @@ dependencies = [
[[package]] [[package]]
name = "webpki-roots" name = "webpki-roots"
version = "0.26.1" version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd"
dependencies = [ dependencies = [
"rustls-pki-types", "rustls-pki-types",
] ]
@ -4004,9 +3999,9 @@ dependencies = [
[[package]] [[package]]
name = "winnow" name = "winnow"
version = "0.6.9" version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86c949fede1d13936a99f14fafd3e76fd642b556dd2ce96287fbe2e0151bfac6" checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1"
dependencies = [ dependencies = [
"memchr", "memchr",
] ]
@ -4114,9 +4109,9 @@ dependencies = [
[[package]] [[package]]
name = "zerovec" name = "zerovec"
version = "0.10.2" version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" checksum = "5d7fce6acea41ceb5b97f7aee91a5d876d5fbca1f847cb60e13afecd7093cad0"
dependencies = [ dependencies = [
"databake", "databake",
"serde", "serde",
@ -4127,9 +4122,9 @@ dependencies = [
[[package]] [[package]]
name = "zerovec-derive" name = "zerovec-derive"
version = "0.10.2" version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

2
Cargo.toml

@ -115,7 +115,7 @@ intrusive-collections = "0.9.6"
cfg-if = "1.0.0" cfg-if = "1.0.0"
either = "1.12.0" either = "1.12.0"
sys-locale = "0.3.1" sys-locale = "0.3.1"
temporal_rs = { git = "https://github.com/boa-dev/temporal.git", rev = "61a05fbb7c72353deda72a3df0e6887d65b840d2" } temporal_rs = { git = "https://github.com/boa-dev/temporal.git", rev = "ec2f2d00294ee641285ec1570df6683ecd0d1a8e" }
web-time = "1.1.0" web-time = "1.1.0"
criterion = "0.5.1" criterion = "0.5.1"
float-cmp = "0.9.0" float-cmp = "0.9.0"

2
core/engine/src/builtins/options.rs

@ -116,7 +116,7 @@ impl OptionType for f64 {
if !value.is_finite() { if !value.is_finite() {
return Err(JsNativeError::range() return Err(JsNativeError::range()
.with_message("roundingIncrement must be finite.") .with_message("numeric option must be finite.")
.into()); .into());
} }

7
core/engine/src/builtins/temporal/duration/mod.rs

@ -18,11 +18,11 @@ use boa_macros::js_str;
use boa_profiler::Profiler; use boa_profiler::Profiler;
use temporal_rs::{ use temporal_rs::{
components::Duration as InnerDuration, components::Duration as InnerDuration,
options::{RelativeTo, TemporalRoundingMode, TemporalUnit}, options::{RelativeTo, RoundingIncrement, TemporalRoundingMode, TemporalUnit},
}; };
use super::{ use super::{
options::{get_temporal_rounding_increment, get_temporal_unit, TemporalUnitGroup}, options::{get_temporal_unit, TemporalUnitGroup},
to_integer_if_integral, DateTimeValues, to_integer_if_integral, DateTimeValues,
}; };
@ -658,7 +658,8 @@ impl Duration {
super::to_relative_temporal_object(&round_to, context)?; super::to_relative_temporal_object(&round_to, context)?;
// 13. Let roundingIncrement be ? ToTemporalRoundingIncrement(roundTo). // 13. Let roundingIncrement be ? ToTemporalRoundingIncrement(roundTo).
let rounding_increment = get_temporal_rounding_increment(&round_to, context)?; let rounding_increment =
get_option::<RoundingIncrement>(&round_to, js_str!("roundingIncrement"), context)?;
// 14. Let roundingMode be ? ToTemporalRoundingMode(roundTo, "halfExpand"). // 14. Let roundingMode be ? ToTemporalRoundingMode(roundTo, "halfExpand").
let rounding_mode = let rounding_mode =

1
core/engine/src/builtins/temporal/error.rs

@ -9,6 +9,7 @@ impl From<TemporalError> for JsNativeError {
ErrorKind::Type => JsNativeError::typ().with_message(value.message()), ErrorKind::Type => JsNativeError::typ().with_message(value.message()),
ErrorKind::Generic => JsNativeError::error().with_message(value.message()), ErrorKind::Generic => JsNativeError::error().with_message(value.message()),
ErrorKind::Syntax => JsNativeError::syntax().with_message(value.message()), ErrorKind::Syntax => JsNativeError::syntax().with_message(value.message()),
ErrorKind::Assert => JsNativeError::error().with_message("internal engine error"),
} }
} }
} }

8
core/engine/src/builtins/temporal/instant/mod.rs

@ -23,7 +23,7 @@ use boa_macros::js_str;
use boa_profiler::Profiler; use boa_profiler::Profiler;
use temporal_rs::{ use temporal_rs::{
components::Instant as InnerInstant, components::Instant as InnerInstant,
options::{TemporalRoundingMode, TemporalUnit}, options::{RoundingIncrement, TemporalRoundingMode, TemporalUnit},
}; };
/// The `Temporal.Instant` object. /// The `Temporal.Instant` object.
@ -287,7 +287,8 @@ impl Instant {
// Fetch the necessary options. // Fetch the necessary options.
let options = get_options_object(args.get_or_undefined(1))?; let options = get_options_object(args.get_or_undefined(1))?;
let mode = get_option::<TemporalRoundingMode>(&options, js_str!("roundingMode"), context)?; let mode = get_option::<TemporalRoundingMode>(&options, js_str!("roundingMode"), context)?;
let increment = get_option::<f64>(&options, js_str!("roundingIncrement"), context)?; let increment =
get_option::<RoundingIncrement>(&options, js_str!("roundingIncrement"), context)?;
let smallest_unit = get_option::<TemporalUnit>(&options, js_str!("smallestUnit"), context)?; let smallest_unit = get_option::<TemporalUnit>(&options, js_str!("smallestUnit"), context)?;
let largest_unit = get_option::<TemporalUnit>(&options, js_str!("largestUnit"), context)?; let largest_unit = get_option::<TemporalUnit>(&options, js_str!("largestUnit"), context)?;
let result = instant let result = instant
@ -315,7 +316,8 @@ impl Instant {
let other = to_temporal_instant(args.get_or_undefined(0))?; let other = to_temporal_instant(args.get_or_undefined(0))?;
let options = get_options_object(args.get_or_undefined(1))?; let options = get_options_object(args.get_or_undefined(1))?;
let mode = get_option::<TemporalRoundingMode>(&options, js_str!("roundingMode"), context)?; let mode = get_option::<TemporalRoundingMode>(&options, js_str!("roundingMode"), context)?;
let increment = get_option::<f64>(&options, js_str!("roundingIncrement"), context)?; let increment =
get_option::<RoundingIncrement>(&options, js_str!("roundingIncrement"), context)?;
let smallest_unit = get_option::<TemporalUnit>(&options, js_str!("smallestUnit"), context)?; let smallest_unit = get_option::<TemporalUnit>(&options, js_str!("smallestUnit"), context)?;
let largest_unit = get_option::<TemporalUnit>(&options, js_str!("largestUnit"), context)?; let largest_unit = get_option::<TemporalUnit>(&options, js_str!("largestUnit"), context)?;
let result = instant let result = instant

50
core/engine/src/builtins/temporal/options.rs

@ -9,53 +9,17 @@
// https://github.com/tc39/proposal-temporal/blob/main/polyfill/index.d.ts // https://github.com/tc39/proposal-temporal/blob/main/polyfill/index.d.ts
use crate::{ use crate::{
builtins::options::{get_option, ParsableOptionType}, builtins::options::{get_option, OptionType, ParsableOptionType},
js_string,
string::JsStr, string::JsStr,
Context, JsNativeError, JsObject, JsResult, Context, JsNativeError, JsObject, JsResult, JsValue,
}; };
use temporal_rs::options::{ use temporal_rs::options::{
ArithmeticOverflow, DurationOverflow, InstantDisambiguation, OffsetDisambiguation, ArithmeticOverflow, DurationOverflow, InstantDisambiguation, OffsetDisambiguation,
TemporalRoundingMode, TemporalUnit, RoundingIncrement, TemporalRoundingMode, TemporalUnit,
}; };
// TODO: Expand docs on the below options. // TODO: Expand docs on the below options.
// TODO: Remove and refactor: migrate to `boa_temporal`
#[inline]
pub(crate) fn get_temporal_rounding_increment(
options: &JsObject,
context: &mut Context,
) -> JsResult<Option<f64>> {
// 1. Let increment be ? GetOption(normalizedOptions, "roundingIncrement", "number", undefined, 1𝔽).
let value = options.get(js_string!("roundingIncrement"), context)?;
if value.is_undefined() {
return Ok(None);
}
let increment = value.to_number(context)?;
// 2. If increment is not finite, throw a RangeError exception.
if !increment.is_finite() {
return Err(JsNativeError::range()
.with_message("rounding increment was out of range.")
.into());
}
// 3. Let integerIncrement be truncate(ℝ(increment)).
let integer_increment = increment.trunc();
// 4. If integerIncrement < 1 or integerIncrement > 10^9, throw a RangeError exception.
if !(1.0..=1_000_000_000.0).contains(&integer_increment) {
return Err(JsNativeError::range()
.with_message("rounding increment was out of range.")
.into());
}
// 5. Return integerIncrement.
Ok(Some(integer_increment))
}
/// Gets the `TemporalUnit` from an options object. /// Gets the `TemporalUnit` from an options object.
#[inline] #[inline]
pub(crate) fn get_temporal_unit( pub(crate) fn get_temporal_unit(
@ -135,3 +99,11 @@ impl ParsableOptionType for DurationOverflow {}
impl ParsableOptionType for InstantDisambiguation {} impl ParsableOptionType for InstantDisambiguation {}
impl ParsableOptionType for OffsetDisambiguation {} impl ParsableOptionType for OffsetDisambiguation {}
impl ParsableOptionType for TemporalRoundingMode {} impl ParsableOptionType for TemporalRoundingMode {}
impl OptionType for RoundingIncrement {
fn from_value(value: JsValue, context: &mut Context) -> JsResult<Self> {
let value = value.to_number(context)?;
Ok(RoundingIncrement::try_from(value)?)
}
}

64
core/engine/src/builtins/temporal/time_zone/mod.rs

@ -336,70 +336,6 @@ pub(super) fn create_temporal_time_zone(
.into()) .into())
} }
/// Abstract operation `ParseTimeZoneOffsetString ( offsetString )`
///
/// The abstract operation `ParseTimeZoneOffsetString` takes argument `offsetString` (a String). It
/// parses the argument as a numeric UTC offset string and returns a signed integer representing
/// that offset as a number of nanoseconds.
///
/// More information:
/// - [ECMAScript specififcation][spec]
///
/// [spec]: https://tc39.es/ecma262/#sec-parsetimezoneoffsetstring
#[allow(clippy::unnecessary_wraps, unused)]
fn parse_timezone_offset_string(offset_string: &str, context: &mut Context) -> JsResult<i64> {
use temporal_rs::parser::{Cursor, TemporalTimeZoneString};
// 1. Let parseResult be ParseText(StringToCodePoints(offsetString), UTCOffset).
let parse_result = TemporalTimeZoneString::parse(&mut Cursor::new(offset_string))?;
// 2. Assert: parseResult is not a List of errors.
// 3. Assert: parseResult contains a TemporalSign Parse Node.
let Some(utc_offset) = parse_result.offset else {
return Err(JsNativeError::typ()
.with_message("Offset string was not a valid offset")
.into());
};
// 4. Let parsedSign be the source text matched by the TemporalSign Parse Node contained within
// parseResult.
// 5. If parsedSign is the single code point U+002D (HYPHEN-MINUS) or U+2212 (MINUS SIGN), then
let sign = utc_offset.sign;
// a. Let sign be -1.
// 6. Else,
// a. Let sign be 1.
// 7. NOTE: Applications of StringToNumber below do not lose precision, since each of the parsed
// values is guaranteed to be a sufficiently short string of decimal digits.
// 8. Assert: parseResult contains an Hour Parse Node.
// 9. Let parsedHours be the source text matched by the Hour Parse Node contained within parseResult.
let parsed_hours = utc_offset.hour;
// 10. Let hours be ℝ(StringToNumber(CodePointsToString(parsedHours))).
// 11. If parseResult does not contain a MinuteSecond Parse Node, then
// a. Let minutes be 0.
// 12. Else,
// a. Let parsedMinutes be the source text matched by the first MinuteSecond Parse Node contained within parseResult.
// b. Let minutes be ℝ(StringToNumber(CodePointsToString(parsedMinutes))).
// 13. If parseResult does not contain two MinuteSecond Parse Nodes, then
// a. Let seconds be 0.
// 14. Else,
// a. Let parsedSeconds be the source text matched by the second MinuteSecond Parse Node contained within parseResult.
// b. Let seconds be ℝ(StringToNumber(CodePointsToString(parsedSeconds))).
// 15. If parseResult does not contain a TemporalDecimalFraction Parse Node, then
// a. Let nanoseconds be 0.
// 16. Else,
// a. Let parsedFraction be the source text matched by the TemporalDecimalFraction Parse Node contained within parseResult.
// b. Let fraction be the string-concatenation of CodePointsToString(parsedFraction) and "000000000".
// c. Let nanosecondsString be the substring of fraction from 1 to 10.
// d. Let nanoseconds be ℝ(StringToNumber(nanosecondsString)).
// 17. Return sign × (((hours × 60 + minutes) × 60 + seconds) × 10^9 + nanoseconds).
Err(JsNativeError::error()
.with_message("not yet implemented.")
.into())
}
/// Abstract operation `FormatTimeZoneOffsetString ( offsetNanoseconds )` /// Abstract operation `FormatTimeZoneOffsetString ( offsetNanoseconds )`
fn format_time_zone_offset_string(offset_nanoseconds: i64) -> String { fn format_time_zone_offset_string(offset_nanoseconds: i64) -> String {
// 1. Assert: offsetNanoseconds is an integer. // 1. Assert: offsetNanoseconds is an integer.

2
test262_config.toml

@ -1,4 +1,4 @@
commit = "c00830acef42bdb0e917b5fdec76ed9d399c0eea" commit = "c47b716e8d6bea0c4510d449fd22b7ed5f8b0151"
[ignored] [ignored]
# Not implemented yet: # Not implemented yet:

Loading…
Cancel
Save