feat(js) Implement the Date.UTC binding.

This commit is contained in:
Ivan Enderlin
2018-06-27 09:41:16 +02:00
parent e334c0c5af
commit a4d47afda6
2 changed files with 35 additions and 0 deletions

View File

@ -516,6 +516,15 @@ extern {
#[wasm_bindgen(method, js_name = toUTCString)]
pub fn to_utc_string(this: &Date) -> JsString;
/// The `Date.UTC()` method accepts the same parameters as the
/// longest form of the constructor, and returns the number of
/// milliseconds in a `Date` object since January 1, 1970,
/// 00:00:00, universal time.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC
#[wasm_bindgen(static_method_of = Date, js_name = UTC)]
pub fn utc(year: Number, month: Number) -> Number;
/// The valueOf() method returns the primitive value of
/// a Date object.
///