mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-22 17:21:35 +00:00
Add date to json
This commit is contained in:
@ -376,6 +376,12 @@ extern {
|
||||
#[wasm_bindgen]
|
||||
extern {
|
||||
pub type Date;
|
||||
|
||||
/// The toJSON() method returns a string representation of the Date object.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON
|
||||
#[wasm_bindgen(method, js_name = toJSON)]
|
||||
pub fn to_json(this: &Date) -> JsString;
|
||||
|
||||
/// The toLocaleDateString() method returns a string with a language sensitive
|
||||
/// representation of the date portion of this date. The new locales and options
|
||||
|
Reference in New Issue
Block a user