mirror of
https://github.com/tiffany352/rink-rs
synced 2024-11-10 05:34:14 +00:00
Fix month in JavaScript binding (#84)
In JavaScript, Date.getMonth returns a zero-based value (where zero indicates the first month of the year).
This commit is contained in:
parent
492da8cfca
commit
d2dbd1d3d9
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ impl Context {
|
|||
#[wasm_bindgen(js_name = setTime)]
|
||||
pub fn set_time(&mut self, date: Date) {
|
||||
let year = date.get_utc_full_year();
|
||||
let month = date.get_utc_month();
|
||||
let month = date.get_utc_month() + 1;
|
||||
let day = date.get_utc_date();
|
||||
let hour = date.get_utc_hours();
|
||||
let min = date.get_utc_minutes();
|
||||
|
|
Loading…
Reference in a new issue