Skip to content

Commit df956a0

Browse files
committed
Add options parameter to Date.to_locale_time_string
1 parent 24f20ae commit df956a0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/js-sys/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3390,7 +3390,7 @@ extern "C" {
33903390
///
33913391
/// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString)
33923392
#[wasm_bindgen(method, js_name = toLocaleTimeString)]
3393-
pub fn to_locale_time_string(this: &Date, locale: &str) -> JsString;
3393+
pub fn to_locale_time_string(this: &Date, locale: &str, options: &JsValue) -> JsString;
33943394

33953395
/// The `toString()` method returns a string representing
33963396
/// the specified Date object.

crates/js-sys/tests/wasm/Date.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ fn to_locale_string() {
484484
fn to_locale_time_string() {
485485
let date = Date::new(&"August 19, 1975 23:15:30".into());
486486
assert_eq!(
487-
JsValue::from(date.to_locale_time_string("en-US")),
487+
JsValue::from(date.to_locale_time_string("en-US", &JsValue::undefined())),
488488
"11:15:30 PM",
489489
);
490490
}

0 commit comments

Comments
 (0)