mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-22 17:21:35 +00:00
Add date to locale time string
This commit is contained in:
11
src/js.rs
11
src/js.rs
@ -376,6 +376,17 @@ extern {
|
||||
#[wasm_bindgen]
|
||||
extern {
|
||||
pub type Date;
|
||||
|
||||
/// The toLocaleTimeString() method returns a string with a language sensitive
|
||||
/// representation of the time portion of this date. The new locales and options
|
||||
/// arguments let applications specify the language whose formatting conventions should be
|
||||
/// used and customize the behavior of the function. In older implementations, which ignore
|
||||
/// the locales and options arguments, the locale used and the form of the string
|
||||
/// returned are entirely implementation dependent.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString
|
||||
#[wasm_bindgen(method, js_name = toLocaleTimeString)]
|
||||
pub fn to_locale_time_string(this: &Date, locale: JsString) -> JsString;
|
||||
|
||||
/// The toString() method returns a string representing
|
||||
/// the specified Date object.
|
||||
|
Reference in New Issue
Block a user