diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-04-15 11:50:14 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-04-15 11:51:11 +0200 |
commit | fca67bb95d4cda5046365e124e79ec583c336697 (patch) | |
tree | c511e5060d170f181c10155c0a5a3583fe66b756 /js/public | |
parent | f8ad954f7d670ba7d4de0648f4b60d3507164dd2 (diff) | |
parent | f4d1b4804a0dad0a616b01edc31187dace152165 (diff) | |
download | UXP-fca67bb95d4cda5046365e124e79ec583c336697.tar UXP-fca67bb95d4cda5046365e124e79ec583c336697.tar.gz UXP-fca67bb95d4cda5046365e124e79ec583c336697.tar.lz UXP-fca67bb95d4cda5046365e124e79ec583c336697.tar.xz UXP-fca67bb95d4cda5046365e124e79ec583c336697.zip |
Merge branch 'html_input_datetime_1'
This is almost everything needed for #162.
Diffstat (limited to 'js/public')
-rw-r--r-- | js/public/Date.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/public/Date.h b/js/public/Date.h index cba0ea875..cab36a3de 100644 --- a/js/public/Date.h +++ b/js/public/Date.h @@ -134,6 +134,14 @@ NewDateObject(JSContext* cx, ClippedTime time); JS_PUBLIC_API(double) MakeDate(double year, unsigned month, unsigned day); +// Year is a year, month is 0-11, day is 1-based, and time is in milliseconds. +// The return value is a number of milliseconds since the epoch. +// +// Consistent with the MakeDate algorithm defined in ECMAScript, this value is +// *not* clipped! Use JS::TimeClip if you need a clipped date. +JS_PUBLIC_API(double) +MakeDate(double year, unsigned month, unsigned day, double time); + // Takes an integer number of milliseconds since the epoch and returns the // year. Can return NaN, and will do so if NaN is passed in. JS_PUBLIC_API(double) |