1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73558],{17375:function(e,t,a){"use strict";function n(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},s=Object.keys(e);for(n=0;n<s.length;n++)a=s[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)a=s[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}a.d(t,{Z:function(){return n}})},83645:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return d}});var n=a(17375),r=a(96156),s=(a(67294),a(3905));function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){(0,r.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var i,m=(i="Intro",function(e){return console.warn("Component "+i+" was not imported, exported, or provided by MDXProvider as global scope"),(0,s.kt)("div",o({},e))}),p={};function d(e){var t=e.components,a=(0,n.Z)(e,["components"]);return(0,s.kt)("wrapper",o(o(o({},p),a),{},{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",o({},{id:"date"}),"Date"),(0,s.kt)(m,{mdxType:"Intro"},(0,s.kt)("p",null,"Provide bindings to JS date. (See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date"))," on MDN.) JavaScript stores dates as the number of milliseconds since\nthe UNIX ",(0,s.kt)("em",{parentName:"p"},"epoch"),", midnight 1 January 1970, UTC.")),(0,s.kt)("p",null,"In these examples, we will be using this date:"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"prelude",prelude:!0}),"let exampleDate = Js.Date.fromFloat(123456654321.0)\n")),(0,s.kt)("p",null,"which is Thu, 29 Nov 1973 21:30:54 GMT. There is no particular significance to this date.\nThe code used to access this date is running in the Europe/Austria time zone with the ",(0,s.kt)("inlineCode",{parentName:"p"},"en_US.utf8")," locale."),(0,s.kt)("p",null,"In all of these functions, month values are in the range 0-11, where January is month zero."),(0,s.kt)("h2",o({},{id:"t"}),"t"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"prelude",prelude:!0}),"type t\n")),(0,s.kt)("h2",o({},{id:"valueof"}),"valueOf"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let valueOf: t => float\n")),(0,s.kt)("p",null,"Returns the primitive value of this date, equivalent to ",(0,s.kt)("inlineCode",{parentName:"p"},"getTime()"),". (See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/valueOf"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.valueOf"))," on MDN.)"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.valueOf(exampleDate) == 123456654321.0\n")),(0,s.kt)("h2",o({},{id:"make"}),"make"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let make: unit => t\n")),(0,s.kt)("p",null,"Returns a date representing the current time. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date()")," Constructor")," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"let now = Js.Date.make()\n")),(0,s.kt)("h2",o({},{id:"fromfloat"}),"fromFloat"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let fromFloat: float => t\n")),(0,s.kt)("p",null,"Returns a date representing the given argument, which is a number of milliseconds since the epoch. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date()")," Constructor")," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.fromFloat(123456654321.0) == exampleDate\n")),(0,s.kt)("h2",o({},{id:"fromstring"}),"fromString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let fromString: string => t\n")),(0,s.kt)("p",null,"Returns a ",(0,s.kt)("inlineCode",{parentName:"p"},"Js.Date.t")," represented by the given string. The string can be in \u201cIETF-compliant RFC 2822 timestamps, and also strings in a version of ISO8601.\u201d Returns ",(0,s.kt)("inlineCode",{parentName:"p"}
1,"NaN")," if given an invalid date string. According to the ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date()")," Constructor")," documentation on MDN, its use is discouraged."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.fromString("Thu, 29 Nov 1973 21:30:54.321 GMT") == exampleDate\nJs.Date.fromString("1973-11-29T21:30:54.321Z00:00") == exampleDate\nJs.Date.fromString("Thor, 32 Lok -19 60:70:80 XYZ") // returns NaN\n')),(0,s.kt)("h2",o({},{id:"makewithym"}),"makeWithYM"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let makeWithYM: (~year: float, ~month: float, unit) => t\n")),(0,s.kt)("p",null,"Returns a date representing midnight of the first day of the given month and year in the current time zone. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date()")," Constructor")," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"let november1 = Js.Date.makeWithYM(~year=2020.0, ~month=10.0, ())\n")),(0,s.kt)("h2",o({},{id:"makewithymd"}),"makeWithYMD"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let makeWithYMD: (~year: float, ~month: float, ~date: float, unit) => t\n")),(0,s.kt)("p",null,"Returns a date representing midnight of the given date of the given month and year in the current time zone. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date()")," Constructor")," on MDN."),(0,s.kt)("h2",o({},{id:"makewithymdh"}),"makeWithYMDH"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let makeWithYMDH: (~year: float, ~month: float, ~date: float, ~hours: float, unit) => t\n")),(0,s.kt)("p",null,"Returns a date representing the given date of the given month and year, at zero minutes and zero seconds past the given ",(0,s.kt)("inlineCode",{parentName:"p"},"hours"),", in the current time zone. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date()")," Constructor")," on MDN. Fractional parts of the arguments are ignored."),(0,s.kt)("h2",o({},{id:"makewithymdhm"}),"makeWithYMDHM"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let makeWithYMDHM: (\n ~year: float,\n ~month: float,\n ~date: float,\n ~hours: float,\n ~minutes: float,\n unit,\n) => t\n")),(0,s.kt)("p",null,"Returns a date representing the given date of the given month and year, at zero seconds past the given time in hours and minutes in the current time zone. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date()")," Constructor")," on MDN."),(0,s.kt)("h2",o({},{id:"makewithymdhms"}),"makeWithYMDHMS"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let makeWithYMDHMS: (\n ~year: float,\n ~month: float,\n ~date: float,\n ~hours: float,\n ~minutes: float,\n ~seconds: float,\n unit,\n) => t\n")),(0,s.kt)("p",null,"Returns a date representing the given date of the given month and year, at the given time in hours, minutes, and seconds in the current time zone. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date()")," Constructor")," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.makeWithYMDHMS(\n ~year=1973.0,\n ~month=11.0,\n ~date=29.0,\n ~hours=21.0,\n ~minutes=30.0,\n ~seconds=54.321,\n (),\n) == exampleDate\n")),(0,s.kt)("h2",o({},{id:"utcwithym"}),"utcWithYM"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let utcWithYM: (~year: float, ~month: float, unit) => float\n")),(0,s.kt)("p",null,"Returns a float representing the number of milliseconds past the epoch for midnight of the first day of the given month and year in UTC. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.UTC"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"let november1 = Js.Date.utcWithYM(~year=2020.0, ~month=10.0, ())\n")),(0,s.kt)("h2",o({},{id:"utcwithymd"}),"utcWithYMD"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let utcWithYMD: (~year: float, ~month: float, ~date: float, unit) => float\n")),(0,s.kt)("p",null,"Returns a float representing the number of milliseconds past the epoch for midnight of the given date of the given month and year in UTC. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.UTC"))," on MDN."),(0,s.kt)("h2",o({},{id:"utcwithymdh"}),"utcWithYMDH"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let utcWithYMDH: (~year: float, ~month: float, ~date: float, ~hours: float, unit) => float\n")),(0,s.kt)("p",null,"Returns a float representing the number of milliseconds past the epoch for midnight of the given date of the given month and year, at zero minutes and seconds past the given hours in UTC. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.UTC"))," on MDN."),(0,s.kt)("h2",o({},{id:"utcwithymdhm"}),"utcWithYMDHM"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let utcWithYMDHM: (\n ~year: float,\n ~month: float,\n ~date: float,\n ~hours: float,\n ~minutes: float,\n unit,\n) => float\n")),(0,s.kt)("p",null,"Returns a float representing the number of milliseconds past the epoch for midnight of the given date of the given month and year, at zero seconds past the given number of minutes past the given hours in UTC. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.UTC"))," on MDN."),(0,s.kt)("h2",o({},{id:"utcwithymdhms"}),"utcWithYMDHMS"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let utcWithYMDHMS: (\n ~year: float,\n ~month: float,\n ~date: float,\n ~hours: float,\n ~minutes: float,\n ~seconds: float,\n unit,\n) => float\n")),(0,s.kt)("p",null,"Returns a float representing the number of milliseconds past the epoch for midnight of the given date of the given month and year, at the given time in hours, minutes and seconds
1in UTC. Fractional parts of arguments are ignored. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.UTC"))," on MDN."),(0,s.kt)("h2",o({},{id:"now"}),"now"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let now: unit => float\n")),(0,s.kt)("p",null,"Returns the current time as number of milliseconds since Unix epoch."),(0,s.kt)("h2",o({},{id:"parse"}),"parse"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let parse: string => t\n")),(0,s.kt)("p",null,"Deprecated. Use ",(0,s.kt)("a",o({parentName:"p"},{href:"#fromstring"}),(0,s.kt)("inlineCode",{parentName:"a"},"fromString()")),"."),(0,s.kt)("h2",o({},{id:"parseasfloat"}),"parseAsFloat"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let parseAsFloat: string => float\n")),(0,s.kt)("p",null,"Returns a float with the number of milliseconds past the epoch represented by the given string. The string can be in \u201cIETF-compliant RFC 2822 timestamps, and also strings in a version of ISO8601.\u201d Returns ",(0,s.kt)("inlineCode",{parentName:"p"},"NaN")," if given an invalid date string. According to the ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.parse"))," documentation on MDN, its use is discouraged. Returns ",(0,s.kt)("inlineCode",{parentName:"p"},"NaN")," if passed invalid date string."),(0,s.kt)("h2",o({},{id:"getdate"}),"getDate"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getDate: t => float\n")),(0,s.kt)("p",null,"Returns the day of the month for its argument. The argument is evaluated in the current time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDate"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getDate"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getDate(exampleDate) == 29.0\n")),(0,s.kt)("h2",o({},{id:"getday"}),"getDay"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getDay: t => float\n")),(0,s.kt)("p",null,"Returns the day of the week (0.0-6.0) for its argument, where 0.0 represents Sunday. The argument is evaluated in the current time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getDay"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getDay(exampleDate) == 4.0\n")),(0,s.kt)("h2",o({},{id:"getfullyear"}),"getFullYear"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getFullYear: t => float\n")),(0,s.kt)("p",null,"Returns the full year (as opposed to the range 0-99) for its argument. The argument is evaluated in the current time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getFullYear"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getFullYear"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getFullYear(exampleDate) == 1973.0\n")),(0,s.kt)("h2",o({},{id:"gethours"}),"getHours"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getHours: t => float\n")),(0,s.kt)("p",null,"Returns the hours for its argument, evaluated in the current time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getHours(exampleDate) == 22.0 // Vienna is in GMT+01:00\n")),(0,s.kt)("h2",o({},{id:"getmilliseconds"}),"getMilliseconds"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getMilliseconds: t => float\n")),(0,s.kt)("p",null,"Returns the number of milliseconds for its argument, evaluated in the current time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getMilliseconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getMilliseconds(exampleDate) == 321.0\n")),(0,s.kt)("h2",o({},{id:"getminutes"}),"getMinutes"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getMinutes: t => float\n")),(0,s.kt)("p",null,"Returns the number of minutes for its argument, evaluated in the current time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMinutes"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getMinutes"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getMinutes(exampleDate) == 30.0\n")),(0,s.kt)("h2",o({},{id:"getmonth"}),"getMonth"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getMonth: t => float\n")),(0,s.kt)("p",null,"Returns the month (0.0-11.0) for its argument, evaluated in the current time zone. January is month zero. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getMonth"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getMonth(exampleDate) == 10.0\n")),(0,s.kt)("h2",o({},{id:"getseconds"}),"getSeconds"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getSeconds: t => float\n")),(0,s.kt)("p",null,"Returns the seconds for its argument, evaluated in the current time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getSeconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getSeconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getSeconds(exampleDate) == 54.0\n")),(0,s.kt)("h2",o({},{id:"gettime"}),"getTime"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getTime: t => float\n")),(0,s.kt)("p",null,"Returns the number of milliseconds since Unix epoch, evaluated in UTC. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getTime"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getTime(exampleDate) == 123456654321.0\n")),(0,s.kt)("h2",o({},{id:"gettimezoneoffset"}),"getTimezoneOffset"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getTimezoneOffset: t => float\n")),(0,s.kt)("p",null,"Returns the time zone offset in minutes from the current time zone to UTC. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getTimezoneOffset"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getTimezoneOffset(exampleDate) == -60.0\n")),(0,s.kt)("h2",o({},{id:"getutcdate"}),"getUTCDate"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getUTCDate: t => float\n")),(0,s.kt)("p",null,"Returns the day of the month of the argument, evaluated in UTC. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/get
1UTCDate"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getUTCDate"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getUTCDate(exampleDate) == 29.0\n")),(0,s.kt)("h2",o({},{id:"getutcday"}),"getUTCDay"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getUTCDay: t => float\n")),(0,s.kt)("p",null,"Returns the day of the week of the argument, evaluated in UTC. The range of the return value is 0.0-6.0, where Sunday is zero. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDay"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getUTCDay"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getUTCDay(exampleDate) == 4.0\n")),(0,s.kt)("h2",o({},{id:"getutcfullyear"}),"getUTCFullYear"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getUTCFullYear: t => float\n")),(0,s.kt)("p",null,"Returns the full year (as opposed to the range 0-99) for its argument. The argument is evaluated in UTC. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getUTCFullYear"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getUTCFullYear(exampleDate) == 1973.0\n")),(0,s.kt)("h2",o({},{id:"getutchours"}),"getUTCHours"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getUTCHours: t => float\n")),(0,s.kt)("p",null,"Returns the hours for its argument, evaluated in the current time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getUTCHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getUTCHours(exampleDate) == 21.0\n")),(0,s.kt)("h2",o({},{id:"getutcmilliseconds"}),"getUTCMilliseconds"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getUTCMilliseconds: t => float\n")),(0,s.kt)("p",null,"Returns the number of milliseconds for its argument, evaluated in UTC. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getUTCMilliseconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getUTCMilliseconds(exampleDate) == 321.0\n")),(0,s.kt)("h2",o({},{id:"getutcminutes"}),"getUTCMinutes"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getUTCMinutes: t => float\n")),(0,s.kt)("p",null,"Returns the number of minutes for its argument, evaluated in UTC. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getUTCMinutes"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getUTCMinutes(exampleDate) == 30.0\n")),(0,s.kt)("h2",o({},{id:"getutcmonth"}),"getUTCMonth"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getUTCMonth: t => float\n")),(0,s.kt)("p",null,"Returns the month (0.0-11.0) for its argument, evaluated in UTC. January is month zero. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/get
1UTCMonth"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getUTCMonth"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getUTCMonth(exampleDate) == 10.0\n")),(0,s.kt)("h2",o({},{id:"getutcseconds"}),"getUTCSeconds"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getUTCSeconds: t => float\n")),(0,s.kt)("p",null,"Returns the seconds for its argument, evaluated in UTC. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.getUTCSeconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),"Js.Date.getUTCSeconds(exampleDate) == 54.0\n")),(0,s.kt)("h2",o({},{id:"getyear"}),"getYear"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let getYear: t => float\n")),(0,s.kt)("p",null,"Deprecated. Use ",(0,s.kt)("inlineCode",{parentName:"p"},"getFullYear()")," instead."),(0,s.kt)("h2",o({},{id:"setdate"}),"setDate"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setDate: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s day of month to the value in the second argument according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setDate"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setDate"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet twoWeeksBefore = Js.Date.setDate(date1, 15.0)\ndate1 == Js.Date.fromString("1973-11-15T21:30:54.321Z00:00")\ntwoWeeksBefore == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setfullyear"}),"setFullYear"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setFullYear: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s year to the value in the second argument according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setFullYear"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet nextYear = Js.Date.setFullYear(date1, 1974.0)\ndate1 == Js.Date.fromString("1974-11-15T21:30:54.321Z00:00")\nnextYear == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setfullyearm"}),"setFullYearM"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setFullYearM: (t, ~year: float, ~month: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s year and month to the values in the labeled arguments according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setFullYear"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet future = Js.Date.setFullYearM(date1, ~year=1974.0, ~month=0.0, ())\ndate1 == Js.Date.fromString("1974-01-22T21:30:54.321Z00:00")\nfuture == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setfullyearmd"}),"setFullYearMD"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setFullYearMD: (t, ~year: float, ~month: float, ~date: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s year, month, and day of month to the values in the labeled arguments according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setFullYear"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet future = Js.Date.setFullYearMD(date1, ~year=1974.0, ~month=0.0, ~date=7.0, ())\ndate1 == Js.Date.fromString("1974-01-07T21:30:54.321Z00:00")\nfuture == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"sethours"}),"setHours"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setHours: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s hours to the value in the second argument according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet nextHour = Js.Date.setHours(date1, 22.0)\ndate1 == Js.Date.fromString("1973-11-29T22:30:54.321Z00:00")\nnextHour == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"sethoursm"}),"setHoursM"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setHoursM: (t, ~hours: float, ~minutes: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s hours and minutes to the values in the labeled arguments according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setHoursM(date1, ~hours=22.0, ~minutes=46.0, ())\ndate1 == Js.Date.fromString("1973-11-29T22:46:54.321Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"sethoursms"}),"setHoursMS"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setHoursMS: (t, ~hours: float, ~minutes: float, ~seconds: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s hours, minutes, and seconds to the values in the labeled arguments according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setHoursMS(date1, ~hours=22.0, ~minutes=46.0, ~seconds=37.0, ())\ndate1 == Js.Date.fromString("1973-11-29T22:46:37.321Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"sethoursmsms"}),"setHoursMSMs"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setHoursMSMs: (\n t,\n ~hours: float,\n ~minutes: float,\n ~seconds: float,\n ~milliseconds: float,\n unit,\n) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s hours, minutes, seconds, and milliseconds to the values in the labeled arguments according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setHoursMSMs(\n date1,\n ~hours=22.0,\n ~minutes=46.0,\n ~seconds=37.0,\n ~milliseconds=494.0,\n (),\n)\ndate1 == Js.Date.fromString("1973-11-29T22:46:37.494Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setmilliseconds"}),"setMilliseconds"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setMilliseconds: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s milliseconds to the value in the second argument according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setMilliseconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMilliseconds(date1, 494.0)\ndate1 == Js.Date.fromString("1973-11-29T21:30:54.494Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setminutes"}),"setMinutes"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setMinutes: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s minutes to the value in the second argument according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setMinutes"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMinutes(date1, 34.0)\ndate1 == Js.Date.fromString("1973-11-29T21:34:54.494Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setminutess"}),"setMinutesS"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setMinutesS: (t, ~minutes: float, ~seconds: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s minutes and seconds to the values in the labeled arguments according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setMinutes"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMinutesS(date1, ~minutes=34.0, ~seconds=56.0, ())\ndate1 == Js.Date.fromString("1973-11-29T21:34:56.494Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setminutessms"}),"setMinutesSMs"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setMinutesSMs: (t, ~minutes: float, ~seconds: float, ~milliseconds: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s minutes, seconds, and milliseconds to the values in the labeled arguments according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setMinutes"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMinutesSMs(\n date1,\n ~minutes=34.0,\n ~seconds=56.0,\n ~milliseconds=789.0,\n (),\n)\ndate1 == Js.Date.fromString("1973-11-29T21:34:56.789Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setmonth"}),"setMonth"),(0,s.kt)(
1"pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setMonth: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s month to the value in the second argument according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setMonth"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMonth(date1, 11.0)\ndate1 == Js.Date.fromString("1973-12-29T21:34:56.789Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setmonthd"}),"setMonthD"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setMonthD: (t, ~month: float, ~date: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s month and day of month to the values in the labeled arguments according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setMonth"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMonthD(date1, ~month=11.0, ~date=8.0, ())\ndate1 == Js.Date.fromString("1973-12-08T21:34:56.789Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setseconds"}),"setSeconds"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setSeconds: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s seconds to the value in the second argument according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setSeconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setSeconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setSeconds(date1, 56.0)\ndate1 == Js.Date.fromString("1973-12-29T21:30:56.321Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setsecondsms"}),"setSecondsMs"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setSecondsMs: (t, ~seconds: float, ~milliseconds: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s seconds and milliseconds to the values in the labeled arguments according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setSeconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setSeconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setSecondsMs(date1, ~seconds=56.0, ~milliseconds=789.0, ())\ndate1 == Js.Date.fromString("1973-12-29T21:30:56.789Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"settime"}),"setTime"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setTime: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s value in terms of milliseconds since the epoch. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setTime"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setTime"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setTime(date1, 198765432101.0)\n\ndate1 == Js.Date.fromString("1976-04-19T12:37:12.101Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcdate"}),"setUTCDate"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCDate: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s day of month to the value in the second argument according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCDate"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCDate"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet twoWeeksBefore = Js.Date.setUTCDate(date1, 15.0)\ndate1 == Js.Date.fromString("1973-11-15T21:30:54.321Z00:00")\ntwoWeeksBefore == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcfullyear"}),"setUTCFullYear"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCFullYear: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s year to the value in the second argument according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCFullYear"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet nextYear = Js.Date.setUTCFullYear(date1, 1974.0)\ndate1 == Js.Date.fromString("1974-11-15T21:30:54.321Z00:00")\nnextYear == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcfullyearm"}),"setUTCFullYearM"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCFullYearM: (t, ~year: float, ~month: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s year and month to the values in the labeled arguments according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCFullYear"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet future = Js.Date.setUTCFullYearM(date1, ~year=1974.0, ~month=0.0, ())\ndate1 == Js.Date.fromString("1974-01-22T21:30:54.321Z00:00")\nfuture == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcfullyearmd"}),"setUTCFullYearMD"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCFullYearMD: (t, ~year: float, ~month: float, ~date: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s year, month, and day of month to the values in the labeled arguments according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCFullYear"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet future = Js.Date.setUTCFullYearMD(date1, ~year=1974.0, ~month=0.0, ~date=7.0, ())\ndate1 == Js.Date.fromString("1974-01-07T21:30:54.321Z00:00")\nfuture == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutchours"}),"setUTCHours"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCHours: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s hours to the value in the second argument according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet nextHour = Js.Date.setUTCHours(date1, 22.0)\ndate1 == Js.Date.fromString("1973-11-29T22:30:54.321Z00:00")\nnextHour == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutchoursm"}),"setUTCHoursM"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCHoursM: (t, ~hours: float, ~minutes: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s hours and minutes to the values in the labeled arguments according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCHoursM(date1, ~hours=22.0, ~minutes=46.0, ())\ndate1 == Js.Date.fromString("1973-11-29T22:46:54.321Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutchoursms"}),"setUTCHoursMS"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCHoursMS: (t, ~hours: float, ~minutes: float, ~seconds: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s hours, minutes, and seconds to the values in the labeled arguments according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCHoursMS(date1, ~hours=22.0, ~minutes=46.0, ~seconds=37.0, ())\ndate1 == Js.Date.fromString("1973-11-29T22:46:37.321Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutchoursmsms"}),"setUTCHoursMSMs"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCHoursMSMs: (\n t,\n ~hours: float,\n ~minutes: float,\n ~seconds: float,\n ~milliseconds: float,\n unit,\n) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s hours, minutes, seconds, and milliseconds to the values in the labeled arguments according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCHours"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCHoursMSMs(\n date1,\n ~hours=22.0,\n ~minutes=46.0,\n ~seconds=37.0,\n ~milliseconds=494.0,\n (),\n)\ndate1 == Js.Date.fromString("1973-11-29T22:46:37.494Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcmilliseconds"}),"setUTCMilliseconds"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCMilliseconds: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"
1},"Date"),"\u2019s milliseconds to the value in the second argument according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCMilliseconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMilliseconds(date1, 494.0)\ndate1 == Js.Date.fromString("1973-11-29T21:30:54.494Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcminutes"}),"setUTCMinutes"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCMinutes: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s minutes to the value in the second argument according to the current time zone. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCMinutes"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMinutes(date1, 34.0)\ndate1 == Js.Date.fromString("1973-11-29T21:34:54.494Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcminutess"}),"setUTCMinutesS"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCMinutesS: (t, ~minutes: float, ~seconds: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s minutes and seconds to the values in the labeled arguments according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCMinutes"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMinutesS(date1, ~minutes=34.0, ~seconds=56.0, ())\ndate1 == Js.Date.fromString("1973-11-29T21:34:56.494Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcminutessms"}),"setUTCMinutesSMs"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCMinutesSMs: (t, ~minutes: float, ~seconds: float, ~milliseconds: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s minutes, seconds, and milliseconds to the values in the labeled arguments according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCMinutes"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMinutesSMs(\n date1,\n ~minutes=34.0,\n ~seconds=56.0,\n ~milliseconds=789.0,\n (),\n)\ndate1 == Js.Date.fromString("1973-11-29T21:34:56.789Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcmonth"}),"setUTCMonth"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCMonth: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s month to the value in the second argument according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCMonth"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMonth(date1, 11.0)\ndate1 == Js.Date.fromString("1973-12-29T21:34:56.789Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcmonthd"}),"setUTCMonthD"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCMonthD: (t, ~month: float, ~date: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s month and day of month to the values in the labeled arguments according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCMonth"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMonthD(date1, ~month=11.0, ~date=8.0, ())\ndate1 == Js.Date.fromString("1973-12-08T21:34:56.789Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcseconds"}),"setUTCSeconds"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCSeconds: (t, float) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s seconds to the value in the second argument according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCSeconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCSeconds(date1, 56.0)\ndate1 == Js.Date.fromString("1973-12-29T21:30:56.321Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutcsecondsms"}),"setUTCSecondsMs"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCSecondsMs: (t, ~seconds: float, ~milliseconds: float, unit) => float\n")),(0,s.kt)("p",null,"Sets the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),"\u2019s seconds and milliseconds to the values in the labeled arguments according to UTC. Returns the number of milliseconds since the epoch of the updated ",(0,s.kt)("inlineCode",{parentName:"p"},"Date"),". ",(0,s.kt)("em",{parentName:"p"},"This function modifies the original ",(0,s.kt)("inlineCode",{parentName:"em"},"Date"),".")," See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.setUTCSeconds"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCSecondsMs(date1, ~seconds=56.0, ~milliseconds=789.0, ())\ndate1 == Js.Date.fromString("1973-12-29T21:30:56.789Z00:00")\nfutureTime == Js.Date.getTime(date1)\n')),(0,s.kt)("h2",o({},{id:"setutctime"}),"setUTCTime"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setUTCTime: (t, float) => float\n")),(0,s.kt)("p",null,"Same as ",(0,s.kt)("a",o({parentName:"p"},{href:"#settime"}),(0,s.kt)("inlineCode",{parentName:"a"},"setTime()")),"."),(0,s.kt)("h2",o({},{id:"setyear"}),"setYear"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let setYear: (t, float) => float\n")),(0,s.kt)("p",null,"Deprecated. Use ",(0,s.kt)("a",o({parentName:"p"},{href:"#setfullyear"}),(0,s.kt)("inlineCode",{parentName:"a"},"setFullYear()"))," instead."),(0,s.kt)("h2",o({},{id:"todatestring"}),"toDateString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toDateString: t => string\n")),(0,s.kt)("p",null,"Returns the date (day of week, year, month, and day of month) portion of a ",(0,s.kt)("inlineCode",{parentName:"p"},"Date")," in English. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.toDateString"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.toDateString(exampleDate) == "Thu Nov 29 1973"\n')),(0,s.kt)("h2",o({},{id:"togmtstring"}),"toGMTString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toGMTString: t => string\n")),(0,s.kt)("p",null,"Deprecated. Use ",(0,s.kt)("a",o({parentName:"p"},{href:"#toutcstring"}),(0,s.kt)("inlineCode",{parentName:"a"},"toUTCString()"))," instead."),(0,s.kt)("h2",o({},{id:"toisostring"}),"toISOString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toISOString: t => string\n")),(0,s.kt)("p",null,"Returns a simplified version of the ISO 8601 format for the date. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.toISOString"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.toISOString(exampleDate) == "1973-11-29T21:30:54.321Z"\n')),(0,s.kt)("h2",o({},{id:"tojson"}),"toJSON"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toJSON: t => string\n")),(0,s.kt)("p",null,"Deprecated. This method is unsafe. It will be changed to return ",(0,s.kt)("inlineCode",{parentName:"p"},"option")," in a future release. Please use ",(0,s.kt)("inlineCode",{parentName:"p"},"toJSONUnsafe()")," instead."),(0,s.kt)("h2",o({},{id:"tojsonunsafe"}),"toJSONUnsafe"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toJSONUnsafe: t => string\n")),(0,s.kt)("p",null,"Returns a string representation of the given date. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.toJSON"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.toJSONUnsafe(exampleDate) == "1973-11-29T21:30:54.321Z"\n')),(0,s.kt)("h2",o({},{id:"tolocaledatestring"}),"toLocaleDateString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toLocaleDateString: t => string\n")),(0,s.kt)("p",null,"Returns the year, month, and day for the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date")," in the current locale format. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.toLocaleDateString"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.toLocaleDateString(exampleDate) == "11/29/1973" // for en_US.utf8\nJs.Date.toLocaleDateString(exampleDate) == "29.11.73" // for de_DE.utf8\n')),(0,s.kt)("h2",o({},{id:"tolocalestring"}
1),"toLocaleString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toLocaleString: t => string\n")),(0,s.kt)("p",null,"Returns the time and date for the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date")," in the current locale format. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.toLocaleString"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.toLocaleString(exampleDate) == "11/29/1973, 10:30:54 PM" // for en_US.utf8\nJs.Date.toLocaleString(exampleDate) == "29.11.1973, 22:30:54" // for de_DE.utf8\n')),(0,s.kt)("h2",o({},{id:"tolocaletimestring"}),"toLocaleTimeString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toLocaleTimeString: t => string\n")),(0,s.kt)("p",null,"Returns the time of day for the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date")," in the current locale format. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.toLocaleTimeString"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.toLocaleString(exampleDate) == "10:30:54 PM" // for en_US.utf8\nJs.Date.toLocaleString(exampleDate) == "22:30:54" // for de_DE.utf8\n')),(0,s.kt)("h2",o({},{id:"tostring"}),"toString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toString: t => string\n")),(0,s.kt)("p",null,"Returns a string representing the date and time of day for the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date")," in the current locale and time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toString"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.toString"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.toString(\n exampleDate,\n) == "Thu Nov 29 1973 22:30:54 GMT+0100 (Central European Standard Time)"\n')),(0,s.kt)("h2",o({},{id:"totimestring"}),"toTimeString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toTimeString: t => string\n")),(0,s.kt)("p",null,"Returns a string representing the time of day for the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date")," in the current locale and time zone. See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.toTimeString"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.toTimeString(exampleDate) == "22:30:54 GMT+0100 (Central European Standard Time)"\n')),(0,s.kt)("h2",o({},{id:"toutcstring"}),"toUTCString"),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),"let toUTCString: t => string\n")),(0,s.kt)("p",null,"Returns a string representing the date and time of day for the given ",(0,s.kt)("inlineCode",{parentName:"p"},"Date")," in the current locale and UTC (GMT time zone). See ",(0,s.kt)("a",o({parentName:"p"},{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString"}),(0,s.kt)("inlineCode",{parentName:"a"},"Date.toUTCString"))," on MDN."),(0,s.kt)("pre",null,(0,s.kt)("code",o({parentName:"pre"},{className:"language-res",metastring:"example",example:!0}),'Js.Date.toUTCString(exampleDate) == "Thu, 29 Nov 1973 21:30:54 GMT"\n')))}d.isMDXComponent=!0,d.frontmatter={__ghEditHref:"https://github.com/reason-association/rescript-lang.org/blob/master/pages/docs/manual/latest/api/js/date.mdx"}},43453:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/manual/latest/api/js/date",function(){return a(83645)}])}},function(e){e.O(0,[92888,49774,40179],(function(){return t=43453,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.