mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-23 09:41:33 +00:00
Add date to locale date string
This commit is contained in:
12
src/js.rs
12
src/js.rs
@ -377,6 +377,18 @@ extern {
|
||||
extern {
|
||||
pub type Date;
|
||||
|
||||
/// The toLocaleDateString() method returns a string with a language sensitive
|
||||
/// representation of the date portion of this date. The new locales and options
|
||||
/// arguments let applications specify the language whose formatting conventions
|
||||
/// should be used and allow to 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/toLocaleDateString
|
||||
#[wasm_bindgen(method, js_name = toLocaleDateString)]
|
||||
pub fn to_locale_date_string(this: &Date, locale: JsString, options: JsValue) -> JsString;
|
||||
|
||||
/// The toLocaleString() method returns a string with a language sensitive
|
||||
/// representation of this date. The new locales and options arguments
|
||||
/// let applications specify the language whose formatting conventions
|
||||
|
Reference in New Issue
Block a user