1
1
type t = Js .Date .t
2
2
3
- module Time = {
4
- type t = float
5
- }
3
+ type time = float
6
4
7
- @send external valueOf : t => Time . t = "valueOf"
5
+ @send external valueOf : t => time = "valueOf"
8
6
9
7
@new external make : unit => t = "Date"
10
8
@new external fromString : string => t = "Date"
11
- @new external fromTime : Time . t => t = "Date"
9
+ @new external fromTime : time => t = "Date"
12
10
13
11
@new external makeWithYM : (~year : int , ~month : int ) => t = "Date"
14
12
@new external makeWithYMD : (~year : int , ~month : int , ~date : int ) => t = "Date"
@@ -37,18 +35,18 @@ external makeWithYMDHMSM: (
37
35
) => t = "Date"
38
36
39
37
module UTC = {
40
- @val external makeWithYM : (~year : int , ~month : int ) => Time . t = "Date.UTC"
41
- @val external makeWithYMD : (~year : int , ~month : int , ~date : int ) => Time . t = "Date.UTC"
38
+ @val external makeWithYM : (~year : int , ~month : int ) => time = "Date.UTC"
39
+ @val external makeWithYMD : (~year : int , ~month : int , ~date : int ) => time = "Date.UTC"
42
40
@val
43
- external makeWithYMDH : (~year : int , ~month : int , ~date : int , ~hours : int ) => Time . t = "Date.UTC"
41
+ external makeWithYMDH : (~year : int , ~month : int , ~date : int , ~hours : int ) => time = "Date.UTC"
44
42
@val
45
43
external makeWithYMDHM : (
46
44
~year : int ,
47
45
~month : int ,
48
46
~date : int ,
49
47
~hours : int ,
50
48
~minutes : int ,
51
- ) => Time . t = "Date.UTC"
49
+ ) => time = "Date.UTC"
52
50
@val
53
51
external makeWithYMDHMS : (
54
52
~year : int ,
@@ -57,7 +55,7 @@ module UTC = {
57
55
~hours : int ,
58
56
~minutes : int ,
59
57
~seconds : int ,
60
- ) => Time . t = "Date.UTC"
58
+ ) => time = "Date.UTC"
61
59
@val
62
60
external makeWithYMDHMSM : (
63
61
~year : int ,
@@ -67,12 +65,12 @@ module UTC = {
67
65
~minutes : int ,
68
66
~seconds : int ,
69
67
~milliseconds : int ,
70
- ) => Time . t = "Date.UTC"
68
+ ) => time = "Date.UTC"
71
69
}
72
70
73
- @val external now : unit => Time . t = "Date.now"
71
+ @val external now : unit => time = "Date.now"
74
72
75
- @send external getTime : t => Time . t = "getTime"
73
+ @send external getTime : t => time = "getTime"
76
74
@send external getTimezoneOffset : t => int = "getTimezoneOffset"
77
75
78
76
// Locale
0 commit comments