@@ -138,18 +138,18 @@ Values, which are out of range, will be carried over to the next bigger unit (s.
138
138
139
139
## Examples
140
140
```rescript
141
- Date.makeWithYMD(~year=2023, ~month=1, ~date =20)
141
+ Date.makeWithYMD(~year=2023, ~month=1, ~day =20)
142
142
// 2023-02-20T00:00:00.000Z
143
143
144
- Date.makeWithYMD(~year=2023, ~month=1, ~date =-1)
144
+ Date.makeWithYMD(~year=2023, ~month=1, ~day =-1)
145
145
// 2022-11-29T00:00:00.000Z
146
146
147
- Date.makeWithYMD(~year=2023, ~month=1, ~date =29)
147
+ Date.makeWithYMD(~year=2023, ~month=1, ~day =29)
148
148
// 2023-03-01T00:00:00.000Z
149
149
```
150
150
*/
151
151
@new
152
- external makeWithYMD: (~year: int, ~month: int, ~date : int) => t = "Date"
152
+ external makeWithYMD: (~year: int, ~month: int, ~day : int) => t = "Date"
153
153
154
154
/**
155
155
Creates a date object with the given year, month, date (day of month) and hours.
@@ -159,13 +159,13 @@ Values, which are out of range, will be carried over to the next bigger unit (s.
159
159
160
160
## Examples
161
161
```rescript
162
- Date.makeWithYMDH(~year=2023, ~month=1, ~date =20, ~hours=16)
162
+ Date.makeWithYMDH(~year=2023, ~month=1, ~day =20, ~hours=16)
163
163
// 2023-02-20T16:00:00.000Z
164
164
165
- Date.makeWithYMDH(~year=2023, ~month=1, ~date =20, ~hours=24)
165
+ Date.makeWithYMDH(~year=2023, ~month=1, ~day =20, ~hours=24)
166
166
// 2023-02-21T00:00:00.000Z
167
167
168
- Date.makeWithYMDH(~year=2023, ~month=1, ~date =20, ~hours=-1)
168
+ Date.makeWithYMDH(~year=2023, ~month=1, ~day =20, ~hours=-1)
169
169
// 2023-02-19T23:00:00.000Z
170
170
171
171
// Note: The output depends on your local time zone.
@@ -174,7 +174,7 @@ Date.makeWithYMDH(~year=2023, ~month=1, ~date=20, ~hours=-1)
174
174
```
175
175
*/
176
176
@new
177
- external makeWithYMDH: (~year: int, ~month: int, ~date : int, ~hours: int) => t = "Date"
177
+ external makeWithYMDH: (~year: int, ~month: int, ~day : int, ~hours: int) => t = "Date"
178
178
179
179
/**
180
180
Creates a date object with the given year, month, date (day of month), hours and minutes.
@@ -184,13 +184,13 @@ Values, which are out of range, will be carried over to the next bigger unit (s.
184
184
185
185
## Examples
186
186
```rescript
187
- Date.makeWithYMDHM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40)
187
+ Date.makeWithYMDHM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40)
188
188
// 2023-02-20T16:40:00.000Z
189
189
190
- Date.makeWithYMDHM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=60)
190
+ Date.makeWithYMDHM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=60)
191
191
// 2023-02-20T17:00:00.000Z
192
192
193
- Date.makeWithYMDHM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=-1)
193
+ Date.makeWithYMDHM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=-1)
194
194
// 2023-02-20T15:59:00.000Z
195
195
196
196
// Note: The output depends on your local time zone.
@@ -199,7 +199,7 @@ Date.makeWithYMDHM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=-1)
199
199
```
200
200
*/
201
201
@new
202
- external makeWithYMDHM: (~year: int, ~month: int, ~date : int, ~hours: int, ~minutes: int) => t =
202
+ external makeWithYMDHM: (~year: int, ~month: int, ~day : int, ~hours: int, ~minutes: int) => t =
203
203
"Date"
204
204
205
205
/**
@@ -210,13 +210,13 @@ Values, which are out of range, will be carried over to the next bigger unit (s.
210
210
211
211
## Examples
212
212
```rescript
213
- Date.makeWithYMDHMS(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=0)
213
+ Date.makeWithYMDHMS(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=0)
214
214
// 2023-02-20T16:40:00.000Z
215
215
216
- Date.makeWithYMDHMS(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=60)
216
+ Date.makeWithYMDHMS(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=60)
217
217
// 2023-02-20T16:41:00.000Z
218
218
219
- Date.makeWithYMDHMS(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=-1)
219
+ Date.makeWithYMDHMS(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=-1)
220
220
// 2023-02-20T16:39:59.000Z
221
221
222
222
// Note: The output depends on your local time zone.
@@ -228,7 +228,7 @@ Date.makeWithYMDHMS(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~sec
228
228
external makeWithYMDHMS: (
229
229
~year: int,
230
230
~month: int,
231
- ~date : int,
231
+ ~day : int,
232
232
~hours: int,
233
233
~minutes: int,
234
234
~seconds: int,
@@ -242,13 +242,13 @@ Values, which are out of range, will be carried over to the next bigger unit (s.
242
242
243
243
## Examples
244
244
```rescript
245
- Date.makeWithYMDHMSM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=0)
245
+ Date.makeWithYMDHMSM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=0)
246
246
// 2023-02-20T16:40:00.000Z
247
247
248
- Date.makeWithYMDHMSM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=1000)
248
+ Date.makeWithYMDHMSM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=1000)
249
249
// 2023-02-20T16:40:01.000Z
250
250
251
- Date.makeWithYMDHMSM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=-1)
251
+ Date.makeWithYMDHMSM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=-1)
252
252
// 2023-02-20T16:39:59.999Z
253
253
254
254
// Note: The output depends on your local time zone.
@@ -260,7 +260,7 @@ Date.makeWithYMDHMSM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~se
260
260
external makeWithYMDHMSM: (
261
261
~year: int,
262
262
~month: int,
263
- ~date : int,
263
+ ~day : int,
264
264
~hours: int,
265
265
~minutes: int,
266
266
~seconds: int,
@@ -299,18 +299,18 @@ module UTC: {
299
299
300
300
## Examples
301
301
```rescript
302
- Date.UTC.makeWithYMD(~year=2023, ~month=1, ~date =20)
302
+ Date.UTC.makeWithYMD(~year=2023, ~month=1, ~day =20)
303
303
// 1676851200000
304
304
305
- Date.UTC.makeWithYMD(~year=2023, ~month=1, ~date =-1)
305
+ Date.UTC.makeWithYMD(~year=2023, ~month=1, ~day =-1)
306
306
// 1675036800000
307
307
308
- Date.UTC.makeWithYMD(~year=2023, ~month=1, ~date =29)
308
+ Date.UTC.makeWithYMD(~year=2023, ~month=1, ~day =29)
309
309
// 1677628800000
310
310
```
311
311
*/
312
312
@val
313
- external makeWithYMD: (~year: int, ~month: int, ~date : int) => msSinceEpoch = "Date.UTC"
313
+ external makeWithYMD: (~year: int, ~month: int, ~day : int) => msSinceEpoch = "Date.UTC"
314
314
315
315
/**
316
316
Returns the time, in milliseconds, since UNIX epoch (January 1, 1970 00:00:00 UTC).
@@ -320,18 +320,18 @@ module UTC: {
320
320
321
321
## Examples
322
322
```rescript
323
- Date.UTC.makeWithYMDH(~year=2023, ~month=1, ~date =20, ~hours=16)
323
+ Date.UTC.makeWithYMDH(~year=2023, ~month=1, ~day =20, ~hours=16)
324
324
// 1676908800000
325
325
326
- Date.UTC.makeWithYMDH(~year=2023, ~month=1, ~date =20, ~hours=24)
326
+ Date.UTC.makeWithYMDH(~year=2023, ~month=1, ~day =20, ~hours=24)
327
327
// 1676937600000
328
328
329
- Date.UTC.makeWithYMDH(~year=2023, ~month=1, ~date =20, ~hours=-1)
329
+ Date.UTC.makeWithYMDH(~year=2023, ~month=1, ~day =20, ~hours=-1)
330
330
// 1676847600000
331
331
```
332
332
*/
333
333
@val
334
- external makeWithYMDH: (~year: int, ~month: int, ~date : int, ~hours: int) => msSinceEpoch =
334
+ external makeWithYMDH: (~year: int, ~month: int, ~day : int, ~hours: int) => msSinceEpoch =
335
335
"Date.UTC"
336
336
337
337
/**
@@ -342,21 +342,21 @@ module UTC: {
342
342
343
343
## Examples
344
344
```rescript
345
- Date.UTC.makeWithYMDHM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40)
345
+ Date.UTC.makeWithYMDHM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40)
346
346
// 1676911200000
347
347
348
- Date.UTC.makeWithYMDHM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=60)
348
+ Date.UTC.makeWithYMDHM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=60)
349
349
// 1676912400000
350
350
351
- Date.UTC.makeWithYMDHM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=-1)
351
+ Date.UTC.makeWithYMDHM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=-1)
352
352
// 1676908740000
353
353
```
354
354
*/
355
355
@val
356
356
external makeWithYMDHM: (
357
357
~year: int,
358
358
~month: int,
359
- ~date : int,
359
+ ~day : int,
360
360
~hours: int,
361
361
~minutes: int,
362
362
) => msSinceEpoch = "Date.UTC"
@@ -369,21 +369,21 @@ module UTC: {
369
369
370
370
## Examples
371
371
```rescript
372
- Date.UTC.makeWithYMDHMS(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=0)
372
+ Date.UTC.makeWithYMDHMS(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=0)
373
373
// 1676911200000
374
374
375
- Date.UTC.makeWithYMDHMS(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=60)
375
+ Date.UTC.makeWithYMDHMS(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=60)
376
376
// 1676911260000
377
377
378
- Date.UTC.makeWithYMDHMS(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=-1)
378
+ Date.UTC.makeWithYMDHMS(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=-1)
379
379
// 1676911199000
380
380
```
381
381
*/
382
382
@val
383
383
external makeWithYMDHMS: (
384
384
~year: int,
385
385
~month: int,
386
- ~date : int,
386
+ ~day : int,
387
387
~hours: int,
388
388
~minutes: int,
389
389
~seconds: int,
@@ -397,21 +397,21 @@ module UTC: {
397
397
398
398
## Examples
399
399
```rescript
400
- Date.UTC.makeWithYMDHMSM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=0)->Console.log
400
+ Date.UTC.makeWithYMDHMSM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=0)->Console.log
401
401
// 1676911200000
402
402
403
- Date.UTC.makeWithYMDHMSM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=1000)->Console.log
403
+ Date.UTC.makeWithYMDHMSM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=1000)->Console.log
404
404
// 1676911201000
405
405
406
- Date.UTC.makeWithYMDHMSM(~year=2023, ~month=1, ~date =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=-1)->Console.log
406
+ Date.UTC.makeWithYMDHMSM(~year=2023, ~month=1, ~day =20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=-1)->Console.log
407
407
// 1676911199999
408
408
```
409
409
*/
410
410
@val
411
411
external makeWithYMDHMSM: (
412
412
~year: int,
413
413
~month: int,
414
- ~date : int,
414
+ ~day : int,
415
415
~hours: int,
416
416
~minutes: int,
417
417
~seconds: int,
@@ -607,18 +607,18 @@ Date.fromString("2023-02-20T16:40:00.00")->Date.setFullYearM(~year=2024, ~month=
607
607
external setFullYearM: (t, ~year: int, ~month: int) => unit = "setFullYear"
608
608
609
609
/**
610
- `setFullYearMD(date, ~year, ~month, ~date )`
610
+ `setFullYearMD(date, ~year, ~month, ~day )`
611
611
612
612
Sets the year, month and date (day of month) of a date (according to local time).
613
613
Beware this will *mutate* the date.
614
614
615
615
## Examples
616
616
```rescript
617
- Date.fromString("2023-02-20T16:40:00.00")->Date.setFullYearMD(~year=2024, ~month=0, ~date =1)
617
+ Date.fromString("2023-02-20T16:40:00.00")->Date.setFullYearMD(~year=2024, ~month=0, ~day =1)
618
618
```
619
619
*/
620
620
@send
621
- external setFullYearMD: (t, ~year: int, ~month: int, ~date : int) => unit = "setFullYear"
621
+ external setFullYearMD: (t, ~year: int, ~month: int, ~day : int) => unit = "setFullYear"
622
622
623
623
/**
624
624
`setMonth(date, month)`
@@ -923,18 +923,18 @@ Date.fromString("2023-02-20T16:40:00.00")->Date.setUTCFullYearM(~year=2024, ~mon
923
923
external setUTCFullYearM: (t, ~year: int, ~month: int) => unit = "setUTCFullYear"
924
924
925
925
/**
926
- `setUTCFullYearMD(date, ~year, ~month, ~date )`
926
+ `setUTCFullYearMD(date, ~year, ~month, ~day )`
927
927
928
928
Sets the year, month and date (day of month) of a date (according to UTC time).
929
929
Beware this will *mutate* the date.
930
930
931
931
## Examples
932
932
```rescript
933
- Date.fromString("2023-02-20T16:40:00.00")->Date.setUTCFullYearMD(~year=2024, ~month=0, ~date =1)
933
+ Date.fromString("2023-02-20T16:40:00.00")->Date.setUTCFullYearMD(~year=2024, ~month=0, ~day =1)
934
934
```
935
935
*/
936
936
@send
937
- external setUTCFullYearMD: (t, ~year: int, ~month: int, ~date : int) => unit = "setUTCFullYear"
937
+ external setUTCFullYearMD: (t, ~year: int, ~month: int, ~day : int) => unit = "setUTCFullYear"
938
938
939
939
/**
940
940
`setUTCMonth(date, month)`
0 commit comments