@tellahq/rescript 10.1.4-republish-1 → 10.1.4-republish-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/darwinarm64/ninja.exe +0 -0
- package/package.json +1 -1
- package/lib/ocaml/arg.cmi +0 -0
- package/lib/ocaml/arg.cmt +0 -0
- package/lib/ocaml/arg.cmti +0 -0
- package/lib/ocaml/arg.ml +0 -359
- package/lib/ocaml/arg.mli +0 -185
- package/lib/ocaml/array.cmi +0 -0
- package/lib/ocaml/array.cmt +0 -0
- package/lib/ocaml/array.cmti +0 -0
- package/lib/ocaml/array.ml +0 -307
- package/lib/ocaml/array.mli +0 -275
- package/lib/ocaml/arrayLabels.cmi +0 -0
- package/lib/ocaml/arrayLabels.cmt +0 -0
- package/lib/ocaml/arrayLabels.cmti +0 -0
- package/lib/ocaml/arrayLabels.ml +0 -307
- package/lib/ocaml/arrayLabels.mli +0 -276
- package/lib/ocaml/belt.cmi +0 -0
- package/lib/ocaml/belt.cmt +0 -0
- package/lib/ocaml/belt.ml +0 -352
- package/lib/ocaml/belt_Array.cmi +0 -0
- package/lib/ocaml/belt_Array.cmt +0 -0
- package/lib/ocaml/belt_Array.cmti +0 -0
- package/lib/ocaml/belt_Array.ml +0 -525
- package/lib/ocaml/belt_Array.mli +0 -707
- package/lib/ocaml/belt_Float.cmi +0 -0
- package/lib/ocaml/belt_Float.cmt +0 -0
- package/lib/ocaml/belt_Float.cmti +0 -0
- package/lib/ocaml/belt_Float.ml +0 -50
- package/lib/ocaml/belt_Float.mli +0 -106
- package/lib/ocaml/belt_HashMap.cmi +0 -0
- package/lib/ocaml/belt_HashMap.cmt +0 -0
- package/lib/ocaml/belt_HashMap.cmti +0 -0
- package/lib/ocaml/belt_HashMap.ml +0 -226
- package/lib/ocaml/belt_HashMap.mli +0 -436
- package/lib/ocaml/belt_HashMapInt.cmi +0 -0
- package/lib/ocaml/belt_HashMapInt.cmt +0 -0
- package/lib/ocaml/belt_HashMapInt.cmti +0 -0
- package/lib/ocaml/belt_HashMapInt.ml +0 -206
- package/lib/ocaml/belt_HashMapInt.mli +0 -50
- package/lib/ocaml/belt_HashMapString.cmi +0 -0
- package/lib/ocaml/belt_HashMapString.cmt +0 -0
- package/lib/ocaml/belt_HashMapString.cmti +0 -0
- package/lib/ocaml/belt_HashMapString.ml +0 -206
- package/lib/ocaml/belt_HashMapString.mli +0 -50
- package/lib/ocaml/belt_HashSet.cmi +0 -0
- package/lib/ocaml/belt_HashSet.cmt +0 -0
- package/lib/ocaml/belt_HashSet.cmti +0 -0
- package/lib/ocaml/belt_HashSet.ml +0 -196
- package/lib/ocaml/belt_HashSet.mli +0 -125
- package/lib/ocaml/belt_HashSetInt.cmi +0 -0
- package/lib/ocaml/belt_HashSetInt.cmt +0 -0
- package/lib/ocaml/belt_HashSetInt.cmti +0 -0
- package/lib/ocaml/belt_HashSetInt.ml +0 -155
- package/lib/ocaml/belt_HashSetInt.mli +0 -74
- package/lib/ocaml/belt_HashSetString.cmi +0 -0
- package/lib/ocaml/belt_HashSetString.cmt +0 -0
- package/lib/ocaml/belt_HashSetString.cmti +0 -0
- package/lib/ocaml/belt_HashSetString.ml +0 -156
- package/lib/ocaml/belt_HashSetString.mli +0 -74
- package/lib/ocaml/belt_Id.cmi +0 -0
- package/lib/ocaml/belt_Id.cmt +0 -0
- package/lib/ocaml/belt_Id.cmti +0 -0
- package/lib/ocaml/belt_Id.ml +0 -133
- package/lib/ocaml/belt_Id.mli +0 -171
- package/lib/ocaml/belt_Int.cmi +0 -0
- package/lib/ocaml/belt_Int.cmt +0 -0
- package/lib/ocaml/belt_Int.cmti +0 -0
- package/lib/ocaml/belt_Int.ml +0 -50
- package/lib/ocaml/belt_Int.mli +0 -103
- package/lib/ocaml/belt_List.cmi +0 -0
- package/lib/ocaml/belt_List.cmt +0 -0
- package/lib/ocaml/belt_List.cmti +0 -0
- package/lib/ocaml/belt_List.ml +0 -803
- package/lib/ocaml/belt_List.mli +0 -844
- package/lib/ocaml/belt_Map.cmi +0 -0
- package/lib/ocaml/belt_Map.cmt +0 -0
- package/lib/ocaml/belt_Map.cmti +0 -0
- package/lib/ocaml/belt_Map.ml +0 -170
- package/lib/ocaml/belt_Map.mli +0 -496
- package/lib/ocaml/belt_MapDict.cmi +0 -0
- package/lib/ocaml/belt_MapDict.cmt +0 -0
- package/lib/ocaml/belt_MapDict.cmti +0 -0
- package/lib/ocaml/belt_MapDict.ml +0 -278
- package/lib/ocaml/belt_MapDict.mli +0 -268
- package/lib/ocaml/belt_MapInt.cmi +0 -0
- package/lib/ocaml/belt_MapInt.cmt +0 -0
- package/lib/ocaml/belt_MapInt.cmti +0 -0
- package/lib/ocaml/belt_MapInt.ml +0 -169
- package/lib/ocaml/belt_MapInt.mli +0 -187
- package/lib/ocaml/belt_MapString.cmi +0 -0
- package/lib/ocaml/belt_MapString.cmt +0 -0
- package/lib/ocaml/belt_MapString.cmti +0 -0
- package/lib/ocaml/belt_MapString.ml +0 -169
- package/lib/ocaml/belt_MapString.mli +0 -187
- package/lib/ocaml/belt_MutableMap.cmi +0 -0
- package/lib/ocaml/belt_MutableMap.cmt +0 -0
- package/lib/ocaml/belt_MutableMap.cmti +0 -0
- package/lib/ocaml/belt_MutableMap.ml +0 -241
- package/lib/ocaml/belt_MutableMap.mli +0 -145
- package/lib/ocaml/belt_MutableMapInt.cmi +0 -0
- package/lib/ocaml/belt_MutableMapInt.cmt +0 -0
- package/lib/ocaml/belt_MutableMapInt.cmti +0 -0
- package/lib/ocaml/belt_MutableMapInt.ml +0 -172
- package/lib/ocaml/belt_MutableMapInt.mli +0 -135
- package/lib/ocaml/belt_MutableMapString.cmi +0 -0
- package/lib/ocaml/belt_MutableMapString.cmt +0 -0
- package/lib/ocaml/belt_MutableMapString.cmti +0 -0
- package/lib/ocaml/belt_MutableMapString.ml +0 -172
- package/lib/ocaml/belt_MutableMapString.mli +0 -135
- package/lib/ocaml/belt_MutableQueue.cmi +0 -0
- package/lib/ocaml/belt_MutableQueue.cmt +0 -0
- package/lib/ocaml/belt_MutableQueue.cmti +0 -0
- package/lib/ocaml/belt_MutableQueue.ml +0 -222
- package/lib/ocaml/belt_MutableQueue.mli +0 -116
- package/lib/ocaml/belt_MutableSet.cmi +0 -0
- package/lib/ocaml/belt_MutableSet.cmt +0 -0
- package/lib/ocaml/belt_MutableSet.cmti +0 -0
- package/lib/ocaml/belt_MutableSet.ml +0 -371
- package/lib/ocaml/belt_MutableSet.mli +0 -617
- package/lib/ocaml/belt_MutableSetInt.cmi +0 -0
- package/lib/ocaml/belt_MutableSetInt.cmt +0 -0
- package/lib/ocaml/belt_MutableSetInt.cmti +0 -0
- package/lib/ocaml/belt_MutableSetInt.ml +0 -342
- package/lib/ocaml/belt_MutableSetInt.mli +0 -124
- package/lib/ocaml/belt_MutableSetString.cmi +0 -0
- package/lib/ocaml/belt_MutableSetString.cmt +0 -0
- package/lib/ocaml/belt_MutableSetString.cmti +0 -0
- package/lib/ocaml/belt_MutableSetString.ml +0 -342
- package/lib/ocaml/belt_MutableSetString.mli +0 -124
- package/lib/ocaml/belt_MutableStack.cmi +0 -0
- package/lib/ocaml/belt_MutableStack.cmt +0 -0
- package/lib/ocaml/belt_MutableStack.cmti +0 -0
- package/lib/ocaml/belt_MutableStack.ml +0 -106
- package/lib/ocaml/belt_MutableStack.mli +0 -63
- package/lib/ocaml/belt_Option.cmi +0 -0
- package/lib/ocaml/belt_Option.cmt +0 -0
- package/lib/ocaml/belt_Option.cmti +0 -0
- package/lib/ocaml/belt_Option.ml +0 -93
- package/lib/ocaml/belt_Option.mli +0 -270
- package/lib/ocaml/belt_Range.cmi +0 -0
- package/lib/ocaml/belt_Range.cmt +0 -0
- package/lib/ocaml/belt_Range.cmti +0 -0
- package/lib/ocaml/belt_Range.ml +0 -76
- package/lib/ocaml/belt_Range.mli +0 -114
- package/lib/ocaml/belt_Result.cmi +0 -0
- package/lib/ocaml/belt_Result.cmt +0 -0
- package/lib/ocaml/belt_Result.cmti +0 -0
- package/lib/ocaml/belt_Result.ml +0 -75
- package/lib/ocaml/belt_Result.mli +0 -205
- package/lib/ocaml/belt_Set.cmi +0 -0
- package/lib/ocaml/belt_Set.cmt +0 -0
- package/lib/ocaml/belt_Set.cmti +0 -0
- package/lib/ocaml/belt_Set.cppo.ml +0 -205
- package/lib/ocaml/belt_Set.cppo.mli +0 -153
- package/lib/ocaml/belt_Set.ml +0 -164
- package/lib/ocaml/belt_Set.mli +0 -523
- package/lib/ocaml/belt_SetDict.cmi +0 -0
- package/lib/ocaml/belt_SetDict.cmt +0 -0
- package/lib/ocaml/belt_SetDict.cmti +0 -0
- package/lib/ocaml/belt_SetDict.ml +0 -237
- package/lib/ocaml/belt_SetDict.mli +0 -567
- package/lib/ocaml/belt_SetInt.cmi +0 -0
- package/lib/ocaml/belt_SetInt.cmt +0 -0
- package/lib/ocaml/belt_SetInt.cmti +0 -0
- package/lib/ocaml/belt_SetInt.ml +0 -201
- package/lib/ocaml/belt_SetInt.mli +0 -151
- package/lib/ocaml/belt_SetString.cmi +0 -0
- package/lib/ocaml/belt_SetString.cmt +0 -0
- package/lib/ocaml/belt_SetString.cmti +0 -0
- package/lib/ocaml/belt_SetString.ml +0 -201
- package/lib/ocaml/belt_SetString.mli +0 -151
- package/lib/ocaml/belt_SortArray.cmi +0 -0
- package/lib/ocaml/belt_SortArray.cmt +0 -0
- package/lib/ocaml/belt_SortArray.cmti +0 -0
- package/lib/ocaml/belt_SortArray.ml +0 -322
- package/lib/ocaml/belt_SortArray.mli +0 -146
- package/lib/ocaml/belt_SortArrayInt.cmi +0 -0
- package/lib/ocaml/belt_SortArrayInt.cmt +0 -0
- package/lib/ocaml/belt_SortArrayInt.cmti +0 -0
- package/lib/ocaml/belt_SortArrayInt.ml +0 -263
- package/lib/ocaml/belt_SortArrayInt.mli +0 -93
- package/lib/ocaml/belt_SortArrayString.cmi +0 -0
- package/lib/ocaml/belt_SortArrayString.cmt +0 -0
- package/lib/ocaml/belt_SortArrayString.cmti +0 -0
- package/lib/ocaml/belt_SortArrayString.ml +0 -263
- package/lib/ocaml/belt_SortArrayString.mli +0 -93
- package/lib/ocaml/belt_internalAVLset.cmt +0 -0
- package/lib/ocaml/belt_internalAVLset.cmti +0 -0
- package/lib/ocaml/belt_internalAVLset.ml +0 -665
- package/lib/ocaml/belt_internalAVLset.mli +0 -124
- package/lib/ocaml/belt_internalAVLtree.cmt +0 -0
- package/lib/ocaml/belt_internalAVLtree.cmti +0 -0
- package/lib/ocaml/belt_internalAVLtree.ml +0 -762
- package/lib/ocaml/belt_internalAVLtree.mli +0 -215
- package/lib/ocaml/belt_internalBuckets.cmt +0 -0
- package/lib/ocaml/belt_internalBuckets.cmti +0 -0
- package/lib/ocaml/belt_internalBuckets.ml +0 -218
- package/lib/ocaml/belt_internalBuckets.mli +0 -57
- package/lib/ocaml/belt_internalBucketsType.cmt +0 -0
- package/lib/ocaml/belt_internalBucketsType.cmti +0 -0
- package/lib/ocaml/belt_internalBucketsType.ml +0 -59
- package/lib/ocaml/belt_internalBucketsType.mli +0 -46
- package/lib/ocaml/belt_internalMapInt.cmt +0 -0
- package/lib/ocaml/belt_internalMapInt.ml +0 -227
- package/lib/ocaml/belt_internalMapString.cmt +0 -0
- package/lib/ocaml/belt_internalMapString.ml +0 -227
- package/lib/ocaml/belt_internalSetBuckets.cmt +0 -0
- package/lib/ocaml/belt_internalSetBuckets.cmti +0 -0
- package/lib/ocaml/belt_internalSetBuckets.ml +0 -157
- package/lib/ocaml/belt_internalSetBuckets.mli +0 -47
- package/lib/ocaml/belt_internalSetInt.cmt +0 -0
- package/lib/ocaml/belt_internalSetInt.ml +0 -129
- package/lib/ocaml/belt_internalSetString.cmt +0 -0
- package/lib/ocaml/belt_internalSetString.ml +0 -129
- package/lib/ocaml/belt_internals.cmti +0 -0
- package/lib/ocaml/belt_internals.mli +0 -79
- package/lib/ocaml/buffer.cmi +0 -0
- package/lib/ocaml/buffer.cmt +0 -0
- package/lib/ocaml/buffer.cmti +0 -0
- package/lib/ocaml/buffer.ml +0 -250
- package/lib/ocaml/buffer.mli +0 -149
- package/lib/ocaml/bytes.cmi +0 -0
- package/lib/ocaml/bytes.cmt +0 -0
- package/lib/ocaml/bytes.cmti +0 -0
- package/lib/ocaml/bytes.ml +0 -431
- package/lib/ocaml/bytes.mli +0 -430
- package/lib/ocaml/bytesLabels.cmi +0 -0
- package/lib/ocaml/bytesLabels.cmt +0 -0
- package/lib/ocaml/bytesLabels.cmti +0 -0
- package/lib/ocaml/bytesLabels.ml +0 -428
- package/lib/ocaml/bytesLabels.mli +0 -276
- package/lib/ocaml/callback.cmi +0 -0
- package/lib/ocaml/callback.cmt +0 -0
- package/lib/ocaml/callback.cmti +0 -0
- package/lib/ocaml/callback.ml +0 -20
- package/lib/ocaml/callback.mli +0 -34
- package/lib/ocaml/camlinternalLazy.cmi +0 -0
- package/lib/ocaml/camlinternalLazy.cmt +0 -0
- package/lib/ocaml/camlinternalLazy.cmti +0 -0
- package/lib/ocaml/camlinternalLazy.ml +0 -89
- package/lib/ocaml/camlinternalLazy.mli +0 -27
- package/lib/ocaml/camlinternalMod.cmi +0 -0
- package/lib/ocaml/camlinternalMod.cmt +0 -0
- package/lib/ocaml/camlinternalMod.cmti +0 -0
- package/lib/ocaml/camlinternalMod.ml +0 -21
- package/lib/ocaml/camlinternalMod.mli +0 -25
- package/lib/ocaml/char.cmi +0 -0
- package/lib/ocaml/char.cmt +0 -0
- package/lib/ocaml/char.cmti +0 -0
- package/lib/ocaml/char.ml +0 -76
- package/lib/ocaml/char.mli +0 -72
- package/lib/ocaml/complex.cmi +0 -0
- package/lib/ocaml/complex.cmt +0 -0
- package/lib/ocaml/complex.cmti +0 -0
- package/lib/ocaml/complex.ml +0 -87
- package/lib/ocaml/complex.mli +0 -86
- package/lib/ocaml/digest.cmi +0 -0
- package/lib/ocaml/digest.cmt +0 -0
- package/lib/ocaml/digest.cmti +0 -0
- package/lib/ocaml/digest.ml +0 -66
- package/lib/ocaml/digest.mli +0 -68
- package/lib/ocaml/dom.cmi +0 -0
- package/lib/ocaml/dom.cmt +0 -0
- package/lib/ocaml/dom.ml +0 -296
- package/lib/ocaml/dom_storage.cmi +0 -0
- package/lib/ocaml/dom_storage.cmt +0 -0
- package/lib/ocaml/dom_storage.ml +0 -22
- package/lib/ocaml/dom_storage2.cmi +0 -0
- package/lib/ocaml/dom_storage2.cmt +0 -0
- package/lib/ocaml/dom_storage2.ml +0 -11
- package/lib/ocaml/filename.cmi +0 -0
- package/lib/ocaml/filename.cmt +0 -0
- package/lib/ocaml/filename.cmti +0 -0
- package/lib/ocaml/filename.ml +0 -233
- package/lib/ocaml/filename.mli +0 -134
- package/lib/ocaml/genlex.cmi +0 -0
- package/lib/ocaml/genlex.cmt +0 -0
- package/lib/ocaml/genlex.cmti +0 -0
- package/lib/ocaml/genlex.ml +0 -201
- package/lib/ocaml/genlex.mli +0 -73
- package/lib/ocaml/hashmap.cppo.ml +0 -214
- package/lib/ocaml/hashmap.cppo.mli +0 -54
- package/lib/ocaml/hashset.cppo.ml +0 -165
- package/lib/ocaml/hashset.cppo.mli +0 -77
- package/lib/ocaml/hashtbl.cmi +0 -0
- package/lib/ocaml/hashtbl.cmt +0 -0
- package/lib/ocaml/hashtbl.cmti +0 -0
- package/lib/ocaml/hashtbl.ml +0 -541
- package/lib/ocaml/hashtbl.mli +0 -411
- package/lib/ocaml/hashtblLabels.cmi +0 -0
- package/lib/ocaml/hashtblLabels.cmt +0 -0
- package/lib/ocaml/hashtblLabels.ml +0 -130
- package/lib/ocaml/int32.cmi +0 -0
- package/lib/ocaml/int32.cmt +0 -0
- package/lib/ocaml/int32.cmti +0 -0
- package/lib/ocaml/int32.ml +0 -64
- package/lib/ocaml/int32.mli +0 -186
- package/lib/ocaml/int64.cmi +0 -0
- package/lib/ocaml/int64.cmt +0 -0
- package/lib/ocaml/int64.cmti +0 -0
- package/lib/ocaml/int64.ml +0 -72
- package/lib/ocaml/int64.mli +0 -197
- package/lib/ocaml/internal_map.cppo.ml +0 -230
- package/lib/ocaml/internal_set.cppo.ml +0 -134
- package/lib/ocaml/js.cmi +0 -0
- package/lib/ocaml/js.cmt +0 -0
- package/lib/ocaml/js.ml +0 -316
- package/lib/ocaml/js_OO.cmi +0 -0
- package/lib/ocaml/js_OO.cmt +0 -0
- package/lib/ocaml/js_OO.ml +0 -180
- package/lib/ocaml/js_array.cmi +0 -0
- package/lib/ocaml/js_array.cmt +0 -0
- package/lib/ocaml/js_array.ml +0 -970
- package/lib/ocaml/js_array2.cmi +0 -0
- package/lib/ocaml/js_array2.cmt +0 -0
- package/lib/ocaml/js_array2.ml +0 -1065
- package/lib/ocaml/js_bigint.cmi +0 -0
- package/lib/ocaml/js_bigint.cmt +0 -0
- package/lib/ocaml/js_bigint.ml +0 -3
- package/lib/ocaml/js_cast.cmi +0 -0
- package/lib/ocaml/js_cast.cmt +0 -0
- package/lib/ocaml/js_cast.cmti +0 -0
- package/lib/ocaml/js_cast.ml +0 -29
- package/lib/ocaml/js_cast.mli +0 -45
- package/lib/ocaml/js_console.cmi +0 -0
- package/lib/ocaml/js_console.cmt +0 -0
- package/lib/ocaml/js_console.ml +0 -51
- package/lib/ocaml/js_date.cmi +0 -0
- package/lib/ocaml/js_date.cmt +0 -0
- package/lib/ocaml/js_date.ml +0 -1263
- package/lib/ocaml/js_dict.cmi +0 -0
- package/lib/ocaml/js_dict.cmt +0 -0
- package/lib/ocaml/js_dict.cmti +0 -0
- package/lib/ocaml/js_dict.ml +0 -114
- package/lib/ocaml/js_dict.mli +0 -152
- package/lib/ocaml/js_exn.cmi +0 -0
- package/lib/ocaml/js_exn.cmt +0 -0
- package/lib/ocaml/js_exn.cmti +0 -0
- package/lib/ocaml/js_exn.ml +0 -102
- package/lib/ocaml/js_exn.mli +0 -79
- package/lib/ocaml/js_float.cmi +0 -0
- package/lib/ocaml/js_float.cmt +0 -0
- package/lib/ocaml/js_float.ml +0 -294
- package/lib/ocaml/js_global.cmi +0 -0
- package/lib/ocaml/js_global.cmt +0 -0
- package/lib/ocaml/js_global.ml +0 -185
- package/lib/ocaml/js_int.cmi +0 -0
- package/lib/ocaml/js_int.cmt +0 -0
- package/lib/ocaml/js_int.ml +0 -158
- package/lib/ocaml/js_json.cmi +0 -0
- package/lib/ocaml/js_json.cmt +0 -0
- package/lib/ocaml/js_json.cmti +0 -0
- package/lib/ocaml/js_json.ml +0 -195
- package/lib/ocaml/js_json.mli +0 -244
- package/lib/ocaml/js_list.cmi +0 -0
- package/lib/ocaml/js_list.cmt +0 -0
- package/lib/ocaml/js_list.cmti +0 -0
- package/lib/ocaml/js_list.ml +0 -174
- package/lib/ocaml/js_list.mli +0 -72
- package/lib/ocaml/js_map.cmi +0 -0
- package/lib/ocaml/js_map.cmt +0 -0
- package/lib/ocaml/js_map.ml +0 -3
- package/lib/ocaml/js_mapperRt.cmi +0 -0
- package/lib/ocaml/js_mapperRt.cmt +0 -0
- package/lib/ocaml/js_mapperRt.cmti +0 -0
- package/lib/ocaml/js_mapperRt.ml +0 -50
- package/lib/ocaml/js_mapperRt.mli +0 -44
- package/lib/ocaml/js_math.cmi +0 -0
- package/lib/ocaml/js_math.cmt +0 -0
- package/lib/ocaml/js_math.ml +0 -626
- package/lib/ocaml/js_null.cmi +0 -0
- package/lib/ocaml/js_null.cmt +0 -0
- package/lib/ocaml/js_null.cmti +0 -0
- package/lib/ocaml/js_null.ml +0 -57
- package/lib/ocaml/js_null.mli +0 -87
- package/lib/ocaml/js_null_undefined.cmi +0 -0
- package/lib/ocaml/js_null_undefined.cmt +0 -0
- package/lib/ocaml/js_null_undefined.cmti +0 -0
- package/lib/ocaml/js_null_undefined.ml +0 -50
- package/lib/ocaml/js_null_undefined.mli +0 -85
- package/lib/ocaml/js_obj.cmi +0 -0
- package/lib/ocaml/js_obj.cmt +0 -0
- package/lib/ocaml/js_obj.ml +0 -100
- package/lib/ocaml/js_option.cmi +0 -0
- package/lib/ocaml/js_option.cmt +0 -0
- package/lib/ocaml/js_option.cmti +0 -0
- package/lib/ocaml/js_option.ml +0 -203
- package/lib/ocaml/js_option.mli +0 -52
- package/lib/ocaml/js_promise.cmi +0 -0
- package/lib/ocaml/js_promise.cmt +0 -0
- package/lib/ocaml/js_promise.ml +0 -100
- package/lib/ocaml/js_promise2.cmi +0 -0
- package/lib/ocaml/js_promise2.cmt +0 -0
- package/lib/ocaml/js_promise2.res +0 -58
- package/lib/ocaml/js_re.cmi +0 -0
- package/lib/ocaml/js_re.cmt +0 -0
- package/lib/ocaml/js_re.ml +0 -184
- package/lib/ocaml/js_result.cmi +0 -0
- package/lib/ocaml/js_result.cmt +0 -0
- package/lib/ocaml/js_result.cmti +0 -0
- package/lib/ocaml/js_result.ml +0 -28
- package/lib/ocaml/js_result.mli +0 -28
- package/lib/ocaml/js_set.cmi +0 -0
- package/lib/ocaml/js_set.cmt +0 -0
- package/lib/ocaml/js_set.ml +0 -3
- package/lib/ocaml/js_string.cmi +0 -0
- package/lib/ocaml/js_string.cmt +0 -0
- package/lib/ocaml/js_string.ml +0 -914
- package/lib/ocaml/js_string2.cmi +0 -0
- package/lib/ocaml/js_string2.cmt +0 -0
- package/lib/ocaml/js_string2.ml +0 -912
- package/lib/ocaml/js_typed_array.cmi +0 -0
- package/lib/ocaml/js_typed_array.cmt +0 -0
- package/lib/ocaml/js_typed_array.cppo.ml +0 -429
- package/lib/ocaml/js_typed_array.ml +0 -1405
- package/lib/ocaml/js_typed_array2.cmi +0 -0
- package/lib/ocaml/js_typed_array2.cmt +0 -0
- package/lib/ocaml/js_typed_array2.cppo.ml +0 -296
- package/lib/ocaml/js_typed_array2.ml +0 -1269
- package/lib/ocaml/js_types.cmi +0 -0
- package/lib/ocaml/js_types.cmt +0 -0
- package/lib/ocaml/js_types.cmti +0 -0
- package/lib/ocaml/js_types.ml +0 -118
- package/lib/ocaml/js_types.mli +0 -78
- package/lib/ocaml/js_undefined.cmi +0 -0
- package/lib/ocaml/js_undefined.cmt +0 -0
- package/lib/ocaml/js_undefined.cmti +0 -0
- package/lib/ocaml/js_undefined.ml +0 -59
- package/lib/ocaml/js_undefined.mli +0 -92
- package/lib/ocaml/js_vector.cmi +0 -0
- package/lib/ocaml/js_vector.cmt +0 -0
- package/lib/ocaml/js_vector.cmti +0 -0
- package/lib/ocaml/js_vector.ml +0 -143
- package/lib/ocaml/js_vector.mli +0 -92
- package/lib/ocaml/js_weakmap.cmi +0 -0
- package/lib/ocaml/js_weakmap.cmt +0 -0
- package/lib/ocaml/js_weakmap.ml +0 -3
- package/lib/ocaml/js_weakset.cmi +0 -0
- package/lib/ocaml/js_weakset.cmt +0 -0
- package/lib/ocaml/js_weakset.ml +0 -3
- package/lib/ocaml/jsx.cmi +0 -0
- package/lib/ocaml/jsx.cmt +0 -0
- package/lib/ocaml/jsx.res +0 -40
- package/lib/ocaml/jsxDOM.cmi +0 -0
- package/lib/ocaml/jsxDOM.cmt +0 -0
- package/lib/ocaml/jsxDOM.res +0 -620
- package/lib/ocaml/jsxDOMStyle.cmi +0 -0
- package/lib/ocaml/jsxDOMStyle.cmt +0 -0
- package/lib/ocaml/jsxDOMStyle.ml +0 -781
- package/lib/ocaml/jsxEvent.cmi +0 -0
- package/lib/ocaml/jsxEvent.cmt +0 -0
- package/lib/ocaml/jsxEvent.ml +0 -358
- package/lib/ocaml/jsxPPXReactSupport.cmi +0 -0
- package/lib/ocaml/jsxPPXReactSupport.cmt +0 -0
- package/lib/ocaml/jsxPPXReactSupport.res +0 -48
- package/lib/ocaml/lazy.cmi +0 -0
- package/lib/ocaml/lazy.cmt +0 -0
- package/lib/ocaml/lazy.cmti +0 -0
- package/lib/ocaml/lazy.ml +0 -70
- package/lib/ocaml/lazy.mli +0 -95
- package/lib/ocaml/lexing.cmi +0 -0
- package/lib/ocaml/lexing.cmt +0 -0
- package/lib/ocaml/lexing.cmti +0 -0
- package/lib/ocaml/lexing.ml +0 -230
- package/lib/ocaml/lexing.mli +0 -172
- package/lib/ocaml/list.cmi +0 -0
- package/lib/ocaml/list.cmt +0 -0
- package/lib/ocaml/list.cmti +0 -0
- package/lib/ocaml/list.ml +0 -485
- package/lib/ocaml/list.mli +0 -347
- package/lib/ocaml/listLabels.cmi +0 -0
- package/lib/ocaml/listLabels.cmt +0 -0
- package/lib/ocaml/listLabels.cmti +0 -0
- package/lib/ocaml/listLabels.ml +0 -485
- package/lib/ocaml/listLabels.mli +0 -353
- package/lib/ocaml/map.cmi +0 -0
- package/lib/ocaml/map.cmt +0 -0
- package/lib/ocaml/map.cmti +0 -0
- package/lib/ocaml/map.cppo.ml +0 -174
- package/lib/ocaml/map.cppo.mli +0 -191
- package/lib/ocaml/map.ml +0 -480
- package/lib/ocaml/map.mli +0 -315
- package/lib/ocaml/mapLabels.cmi +0 -0
- package/lib/ocaml/mapLabels.cmt +0 -0
- package/lib/ocaml/mapLabels.ml +0 -480
- package/lib/ocaml/mapm.cppo.ml +0 -177
- package/lib/ocaml/mapm.cppo.mli +0 -138
- package/lib/ocaml/moreLabels.cmi +0 -0
- package/lib/ocaml/moreLabels.cmt +0 -0
- package/lib/ocaml/moreLabels.cmti +0 -0
- package/lib/ocaml/moreLabels.ml +0 -22
- package/lib/ocaml/moreLabels.mli +0 -198
- package/lib/ocaml/node.cmi +0 -0
- package/lib/ocaml/node.cmt +0 -0
- package/lib/ocaml/node.ml +0 -84
- package/lib/ocaml/node_buffer.cmi +0 -0
- package/lib/ocaml/node_buffer.cmt +0 -0
- package/lib/ocaml/node_buffer.ml +0 -47
- package/lib/ocaml/node_child_process.cmi +0 -0
- package/lib/ocaml/node_child_process.cmt +0 -0
- package/lib/ocaml/node_child_process.ml +0 -50
- package/lib/ocaml/node_fs.cmi +0 -0
- package/lib/ocaml/node_fs.cmt +0 -0
- package/lib/ocaml/node_fs.ml +0 -153
- package/lib/ocaml/node_module.cmi +0 -0
- package/lib/ocaml/node_module.cmt +0 -0
- package/lib/ocaml/node_module.ml +0 -29
- package/lib/ocaml/node_path.cmi +0 -0
- package/lib/ocaml/node_path.cmt +0 -0
- package/lib/ocaml/node_path.ml +0 -71
- package/lib/ocaml/node_process.cmi +0 -0
- package/lib/ocaml/node_process.cmt +0 -0
- package/lib/ocaml/node_process.cmti +0 -0
- package/lib/ocaml/node_process.ml +0 -59
- package/lib/ocaml/node_process.mli +0 -48
- package/lib/ocaml/obj.cmi +0 -0
- package/lib/ocaml/obj.cmt +0 -0
- package/lib/ocaml/obj.cmti +0 -0
- package/lib/ocaml/obj.ml +0 -29
- package/lib/ocaml/obj.mli +0 -62
- package/lib/ocaml/parsing.cmi +0 -0
- package/lib/ocaml/parsing.cmt +0 -0
- package/lib/ocaml/parsing.cmti +0 -0
- package/lib/ocaml/parsing.ml +0 -212
- package/lib/ocaml/parsing.mli +0 -105
- package/lib/ocaml/pervasives.cmi +0 -0
- package/lib/ocaml/pervasives.cmt +0 -0
- package/lib/ocaml/pervasives.cmti +0 -0
- package/lib/ocaml/pervasives.ml +0 -297
- package/lib/ocaml/pervasives.mli +0 -771
- package/lib/ocaml/printexc.cmi +0 -0
- package/lib/ocaml/printexc.cmt +0 -0
- package/lib/ocaml/printexc.cmti +0 -0
- package/lib/ocaml/printexc.ml +0 -75
- package/lib/ocaml/printexc.mli +0 -57
- package/lib/ocaml/queue.cmi +0 -0
- package/lib/ocaml/queue.cmt +0 -0
- package/lib/ocaml/queue.cmti +0 -0
- package/lib/ocaml/queue.ml +0 -132
- package/lib/ocaml/queue.mli +0 -82
- package/lib/ocaml/random.cmi +0 -0
- package/lib/ocaml/random.cmt +0 -0
- package/lib/ocaml/random.cmti +0 -0
- package/lib/ocaml/random.ml +0 -273
- package/lib/ocaml/random.mli +0 -102
- package/lib/ocaml/set.cmi +0 -0
- package/lib/ocaml/set.cmt +0 -0
- package/lib/ocaml/set.cmti +0 -0
- package/lib/ocaml/set.ml +0 -526
- package/lib/ocaml/set.mli +0 -266
- package/lib/ocaml/setLabels.cmi +0 -0
- package/lib/ocaml/setLabels.cmt +0 -0
- package/lib/ocaml/setLabels.ml +0 -526
- package/lib/ocaml/setm.cppo.ml +0 -346
- package/lib/ocaml/setm.cppo.mli +0 -126
- package/lib/ocaml/sort.cmi +0 -0
- package/lib/ocaml/sort.cmt +0 -0
- package/lib/ocaml/sort.cmti +0 -0
- package/lib/ocaml/sort.cppo.ml +0 -267
- package/lib/ocaml/sort.cppo.mli +0 -96
- package/lib/ocaml/sort.ml +0 -99
- package/lib/ocaml/sort.mli +0 -44
- package/lib/ocaml/stack.cmi +0 -0
- package/lib/ocaml/stack.cmt +0 -0
- package/lib/ocaml/stack.cmti +0 -0
- package/lib/ocaml/stack.ml +0 -44
- package/lib/ocaml/stack.mli +0 -63
- package/lib/ocaml/stdLabels.cmi +0 -0
- package/lib/ocaml/stdLabels.cmt +0 -0
- package/lib/ocaml/stdLabels.cmti +0 -0
- package/lib/ocaml/stdLabels.ml +0 -24
- package/lib/ocaml/stdLabels.mli +0 -29
- package/lib/ocaml/stream.cmi +0 -0
- package/lib/ocaml/stream.cmt +0 -0
- package/lib/ocaml/stream.cmti +0 -0
- package/lib/ocaml/stream.ml +0 -213
- package/lib/ocaml/stream.mli +0 -108
- package/lib/ocaml/string.cmi +0 -0
- package/lib/ocaml/string.cmt +0 -0
- package/lib/ocaml/string.cmti +0 -0
- package/lib/ocaml/string.ml +0 -190
- package/lib/ocaml/string.mli +0 -286
- package/lib/ocaml/stringLabels.cmi +0 -0
- package/lib/ocaml/stringLabels.cmt +0 -0
- package/lib/ocaml/stringLabels.cmti +0 -0
- package/lib/ocaml/stringLabels.ml +0 -190
- package/lib/ocaml/stringLabels.mli +0 -241
- package/lib/ocaml/sys.cmi +0 -0
- package/lib/ocaml/sys.cmt +0 -0
- package/lib/ocaml/sys.cmti +0 -0
- package/lib/ocaml/sys.ml +0 -135
- package/lib/ocaml/sys.mli +0 -333
- package/lib/ocaml/uchar.cmi +0 -0
- package/lib/ocaml/uchar.cmt +0 -0
- package/lib/ocaml/uchar.cmti +0 -0
- package/lib/ocaml/uchar.ml +0 -58
- package/lib/ocaml/uchar.mli +0 -98
package/lib/ocaml/js_date.ml
DELETED
|
@@ -1,1263 +0,0 @@
|
|
|
1
|
-
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
|
|
2
|
-
*
|
|
3
|
-
* This program is free software: you can redistribute it and/or modify
|
|
4
|
-
* it under the terms of the GNU Lesser General Public License as published by
|
|
5
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
6
|
-
* (at your option) any later version.
|
|
7
|
-
*
|
|
8
|
-
* In addition to the permissions granted to you by the LGPL, you may combine
|
|
9
|
-
* or link a "work that uses the Library" with a publicly distributed version
|
|
10
|
-
* of this file to produce a combined library or application, then distribute
|
|
11
|
-
* that combined work under the terms of your choosing, with no requirement
|
|
12
|
-
* to comply with the obligations normally placed on you by section 4 of the
|
|
13
|
-
* LGPL version 3 (or the corresponding section of a later version of the LGPL
|
|
14
|
-
* should you choose to use a later version).
|
|
15
|
-
*
|
|
16
|
-
* This program is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
* GNU Lesser General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
22
|
-
* along with this program; if not, write to the Free Software
|
|
23
|
-
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
|
|
24
|
-
|
|
25
|
-
(**
|
|
26
|
-
Provide bindings to JS date. (See
|
|
27
|
-
[`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)
|
|
28
|
-
on MDN.) JavaScript stores dates as the number of milliseconds since the UNIX
|
|
29
|
-
*epoch*, midnight 1 January 1970, UTC.
|
|
30
|
-
*)
|
|
31
|
-
|
|
32
|
-
type t
|
|
33
|
-
|
|
34
|
-
external valueOf : t -> float = "valueOf"
|
|
35
|
-
[@@bs.send]
|
|
36
|
-
(**
|
|
37
|
-
Returns the primitive value of this date, equivalent to `getTime()`. (See
|
|
38
|
-
[`Date.valueOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/valueOf)
|
|
39
|
-
on MDN.)
|
|
40
|
-
|
|
41
|
-
```res example
|
|
42
|
-
Js.Date.valueOf(exampleDate) == 123456654321.0
|
|
43
|
-
```
|
|
44
|
-
*)
|
|
45
|
-
|
|
46
|
-
external make : unit -> t = "Date"
|
|
47
|
-
[@@bs.new]
|
|
48
|
-
(**
|
|
49
|
-
Returns a date representing the current time. See [`Date()`
|
|
50
|
-
Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)
|
|
51
|
-
on MDN.
|
|
52
|
-
|
|
53
|
-
```res example
|
|
54
|
-
let now = Js.Date.make()
|
|
55
|
-
```
|
|
56
|
-
*)
|
|
57
|
-
|
|
58
|
-
external fromFloat : float -> t = "Date"
|
|
59
|
-
[@@bs.new]
|
|
60
|
-
(**
|
|
61
|
-
Returns a date representing the given argument, which is a number of
|
|
62
|
-
milliseconds since the epoch. See [`Date()`
|
|
63
|
-
Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)
|
|
64
|
-
on MDN.
|
|
65
|
-
|
|
66
|
-
```res example
|
|
67
|
-
Js.Date.fromFloat(123456654321.0) == exampleDate
|
|
68
|
-
```
|
|
69
|
-
*)
|
|
70
|
-
|
|
71
|
-
external fromString : string -> t = "Date"
|
|
72
|
-
[@@bs.new]
|
|
73
|
-
(**
|
|
74
|
-
Returns a `Js.Date.t` represented by the given string. The string can be in
|
|
75
|
-
“IETF-compliant RFC 2822 timestamps, and also strings in a version of ISO8601.”
|
|
76
|
-
Returns `NaN` if given an invalid date string. According to the [`Date()`
|
|
77
|
-
Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)
|
|
78
|
-
documentation on MDN, its use is discouraged.
|
|
79
|
-
|
|
80
|
-
```res example
|
|
81
|
-
Js.Date.fromString("Thu, 29 Nov 1973 21:30:54.321 GMT") == exampleDate
|
|
82
|
-
Js.Date.fromString("1973-11-29T21:30:54.321Z00:00") == exampleDate
|
|
83
|
-
Js.Date.fromString("Thor, 32 Lok -19 60:70:80 XYZ") // returns NaN
|
|
84
|
-
```
|
|
85
|
-
*)
|
|
86
|
-
|
|
87
|
-
external makeWithYM : year:float -> month:float -> unit -> t = "Date"
|
|
88
|
-
[@@bs.new]
|
|
89
|
-
(**
|
|
90
|
-
Returns a date representing midnight of the first day of the given month and
|
|
91
|
-
year in the current time zone. Fractional parts of arguments are ignored. See
|
|
92
|
-
[`Date()`
|
|
93
|
-
Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)
|
|
94
|
-
on MDN.
|
|
95
|
-
|
|
96
|
-
```res example
|
|
97
|
-
let november1 = Js.Date.makeWithYM(~year=2020.0, ~month=10.0, ())
|
|
98
|
-
```
|
|
99
|
-
*)
|
|
100
|
-
|
|
101
|
-
external makeWithYMD : year:float -> month:float -> date:float -> unit -> t
|
|
102
|
-
= "Date"
|
|
103
|
-
[@@bs.new]
|
|
104
|
-
(**
|
|
105
|
-
Returns a date representing midnight of the given date of the given month and
|
|
106
|
-
year in the current time zone. Fractional parts of arguments are ignored. See
|
|
107
|
-
[`Date()`
|
|
108
|
-
Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)
|
|
109
|
-
on MDN.
|
|
110
|
-
*)
|
|
111
|
-
|
|
112
|
-
external makeWithYMDH :
|
|
113
|
-
year:float -> month:float -> date:float -> hours:float -> unit -> t = "Date"
|
|
114
|
-
[@@bs.new]
|
|
115
|
-
(**
|
|
116
|
-
Returns a date representing the given date of the given month and year, at zero
|
|
117
|
-
minutes and zero seconds past the given `hours`, in the current time zone.
|
|
118
|
-
Fractional parts of arguments are ignored. See [`Date()`
|
|
119
|
-
Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)
|
|
120
|
-
on MDN. Fractional parts of the arguments are ignored.
|
|
121
|
-
*)
|
|
122
|
-
|
|
123
|
-
external makeWithYMDHM :
|
|
124
|
-
year:float ->
|
|
125
|
-
month:float ->
|
|
126
|
-
date:float ->
|
|
127
|
-
hours:float ->
|
|
128
|
-
minutes:float ->
|
|
129
|
-
unit ->
|
|
130
|
-
t = "Date"
|
|
131
|
-
[@@bs.new]
|
|
132
|
-
(**
|
|
133
|
-
Returns a date representing the given date of the given month and year, at zero
|
|
134
|
-
seconds past the given time in hours and minutes in the current time zone.
|
|
135
|
-
Fractional parts of arguments are ignored. See [`Date()`
|
|
136
|
-
Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)
|
|
137
|
-
on MDN.
|
|
138
|
-
*)
|
|
139
|
-
|
|
140
|
-
external makeWithYMDHMS :
|
|
141
|
-
year:float ->
|
|
142
|
-
month:float ->
|
|
143
|
-
date:float ->
|
|
144
|
-
hours:float ->
|
|
145
|
-
minutes:float ->
|
|
146
|
-
seconds:float ->
|
|
147
|
-
unit ->
|
|
148
|
-
t = "Date"
|
|
149
|
-
[@@bs.new]
|
|
150
|
-
(**
|
|
151
|
-
Returns a date representing the given date of the given month and year, at the
|
|
152
|
-
given time in hours, minutes, and seconds in the current time zone. Fractional
|
|
153
|
-
parts of arguments are ignored. See [`Date()`
|
|
154
|
-
Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)
|
|
155
|
-
on MDN.
|
|
156
|
-
|
|
157
|
-
```res example
|
|
158
|
-
Js.Date.makeWithYMDHMS(
|
|
159
|
-
~year=1973.0,
|
|
160
|
-
~month=11.0,
|
|
161
|
-
~date=29.0,
|
|
162
|
-
~hours=21.0,
|
|
163
|
-
~minutes=30.0,
|
|
164
|
-
~seconds=54.321,
|
|
165
|
-
(),
|
|
166
|
-
) == exampleDate
|
|
167
|
-
```
|
|
168
|
-
*)
|
|
169
|
-
|
|
170
|
-
external utcWithYM : year:float -> month:float -> unit -> float = ""
|
|
171
|
-
[@@bs.val "Date.UTC"]
|
|
172
|
-
(**
|
|
173
|
-
Returns a float representing the number of milliseconds past the epoch for
|
|
174
|
-
midnight of the first day of the given month and year in UTC. Fractional parts
|
|
175
|
-
of arguments are ignored. See
|
|
176
|
-
[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)
|
|
177
|
-
on MDN.
|
|
178
|
-
|
|
179
|
-
```res example
|
|
180
|
-
let november1 = Js.Date.utcWithYM(~year=2020.0, ~month=10.0, ())
|
|
181
|
-
```
|
|
182
|
-
*)
|
|
183
|
-
|
|
184
|
-
external utcWithYMD : year:float -> month:float -> date:float -> unit -> float
|
|
185
|
-
= ""
|
|
186
|
-
[@@bs.val "Date.UTC"]
|
|
187
|
-
(**
|
|
188
|
-
Returns a float representing the number of milliseconds past the epoch for
|
|
189
|
-
midnight of the given date of the given month and year in UTC. Fractional parts
|
|
190
|
-
of arguments are ignored. See
|
|
191
|
-
[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)
|
|
192
|
-
on MDN.
|
|
193
|
-
*)
|
|
194
|
-
|
|
195
|
-
external utcWithYMDH :
|
|
196
|
-
year:float -> month:float -> date:float -> hours:float -> unit -> float = ""
|
|
197
|
-
[@@bs.val "Date.UTC"]
|
|
198
|
-
(**
|
|
199
|
-
Returns a float representing the number of milliseconds past the epoch for
|
|
200
|
-
midnight of the given date of the given month and year, at zero minutes and
|
|
201
|
-
seconds past the given hours in UTC. Fractional parts of arguments are ignored.
|
|
202
|
-
See
|
|
203
|
-
[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)
|
|
204
|
-
on MDN.
|
|
205
|
-
*)
|
|
206
|
-
|
|
207
|
-
external utcWithYMDHM :
|
|
208
|
-
year:float ->
|
|
209
|
-
month:float ->
|
|
210
|
-
date:float ->
|
|
211
|
-
hours:float ->
|
|
212
|
-
minutes:float ->
|
|
213
|
-
unit ->
|
|
214
|
-
float = ""
|
|
215
|
-
[@@bs.val "Date.UTC"]
|
|
216
|
-
(**
|
|
217
|
-
Returns a float representing the number of milliseconds past the epoch for
|
|
218
|
-
midnight of the given date of the given month and year, at zero seconds past
|
|
219
|
-
the given number of minutes past the given hours in UTC. Fractional parts of
|
|
220
|
-
arguments are ignored. See
|
|
221
|
-
[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)
|
|
222
|
-
on MDN.
|
|
223
|
-
*)
|
|
224
|
-
|
|
225
|
-
external utcWithYMDHMS :
|
|
226
|
-
year:float ->
|
|
227
|
-
month:float ->
|
|
228
|
-
date:float ->
|
|
229
|
-
hours:float ->
|
|
230
|
-
minutes:float ->
|
|
231
|
-
seconds:float ->
|
|
232
|
-
unit ->
|
|
233
|
-
float = ""
|
|
234
|
-
[@@bs.val "Date.UTC"]
|
|
235
|
-
(**
|
|
236
|
-
Returns a float representing the number of milliseconds past the epoch for
|
|
237
|
-
midnight of the given date of the given month and year, at the given time in
|
|
238
|
-
hours, minutes and seconds in UTC. Fractional parts of arguments are ignored.
|
|
239
|
-
|
|
240
|
-
See
|
|
241
|
-
[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)
|
|
242
|
-
on MDN.
|
|
243
|
-
*)
|
|
244
|
-
|
|
245
|
-
external now : unit -> float = ""
|
|
246
|
-
[@@bs.val "Date.now"]
|
|
247
|
-
(** Returns the current time as number of milliseconds since Unix epoch. *)
|
|
248
|
-
|
|
249
|
-
external parse : string -> t = "Date"
|
|
250
|
-
[@@bs.new] [@@deprecated "Please use `fromString` instead"]
|
|
251
|
-
|
|
252
|
-
external parseAsFloat : string -> float = ""
|
|
253
|
-
[@@bs.val "parse"] [@@bs.scope "Date"]
|
|
254
|
-
(**
|
|
255
|
-
Returns a float with the number of milliseconds past the epoch represented by
|
|
256
|
-
the given string. The string can be in “IETF-compliant RFC 2822 timestamps, and
|
|
257
|
-
also strings in a version of ISO8601.” Returns `NaN` if given an invalid date
|
|
258
|
-
string. According to the
|
|
259
|
-
[`Date.parse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse)
|
|
260
|
-
documentation on MDN, its use is discouraged. Returns `NaN` if passed invalid
|
|
261
|
-
date string.
|
|
262
|
-
*)
|
|
263
|
-
|
|
264
|
-
external getDate : t -> float = "getDate"
|
|
265
|
-
[@@bs.send]
|
|
266
|
-
(**
|
|
267
|
-
Returns the day of the month for its argument. The argument is evaluated in the
|
|
268
|
-
current time zone. See
|
|
269
|
-
[`Date.getDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDate)
|
|
270
|
-
on MDN.
|
|
271
|
-
|
|
272
|
-
```res example
|
|
273
|
-
Js.Date.getDate(exampleDate) == 29.0
|
|
274
|
-
```
|
|
275
|
-
*)
|
|
276
|
-
|
|
277
|
-
external getDay : t -> float = "getDay"
|
|
278
|
-
[@@bs.send]
|
|
279
|
-
(**
|
|
280
|
-
Returns the day of the week (0.0-6.0) for its argument, where 0.0 represents
|
|
281
|
-
Sunday. The argument is evaluated in the current time zone. See
|
|
282
|
-
[`Date.getDay`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay)
|
|
283
|
-
on MDN.
|
|
284
|
-
|
|
285
|
-
```res example
|
|
286
|
-
Js.Date.getDay(exampleDate) == 4.0
|
|
287
|
-
```
|
|
288
|
-
*)
|
|
289
|
-
|
|
290
|
-
external getFullYear : t -> float = "getFullYear"
|
|
291
|
-
[@@bs.send]
|
|
292
|
-
(**
|
|
293
|
-
Returns the full year (as opposed to the range 0-99) for its argument. The
|
|
294
|
-
argument is evaluated in the current time zone. See
|
|
295
|
-
[`Date.getFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getFullYear)
|
|
296
|
-
on MDN.
|
|
297
|
-
|
|
298
|
-
```res example
|
|
299
|
-
Js.Date.getFullYear(exampleDate) == 1973.0
|
|
300
|
-
```
|
|
301
|
-
*)
|
|
302
|
-
|
|
303
|
-
external getHours : t -> float = "getHours"
|
|
304
|
-
[@@bs.send]
|
|
305
|
-
(**
|
|
306
|
-
Returns the hours for its argument, evaluated in the current time zone. See
|
|
307
|
-
[`Date.getHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getHours)
|
|
308
|
-
on MDN.
|
|
309
|
-
|
|
310
|
-
```res example
|
|
311
|
-
Js.Date.getHours(exampleDate) == 22.0 // Vienna is in GMT+01:00
|
|
312
|
-
```
|
|
313
|
-
*)
|
|
314
|
-
|
|
315
|
-
external getMilliseconds : t -> float = "getMilliseconds"
|
|
316
|
-
[@@bs.send]
|
|
317
|
-
(**
|
|
318
|
-
Returns the number of milliseconds for its argument, evaluated in the current
|
|
319
|
-
time zone. See
|
|
320
|
-
[`Date.getMilliseconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds)
|
|
321
|
-
on MDN.
|
|
322
|
-
|
|
323
|
-
```res example
|
|
324
|
-
Js.Date.getMilliseconds(exampleDate) == 321.0
|
|
325
|
-
```
|
|
326
|
-
*)
|
|
327
|
-
|
|
328
|
-
external getMinutes : t -> float = "getMinutes"
|
|
329
|
-
[@@bs.send]
|
|
330
|
-
(**
|
|
331
|
-
Returns the number of minutes for its argument, evaluated in the current time
|
|
332
|
-
zone. See
|
|
333
|
-
[`Date.getMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMinutes)
|
|
334
|
-
on MDN.
|
|
335
|
-
|
|
336
|
-
```res example
|
|
337
|
-
Js.Date.getMinutes(exampleDate) == 30.0
|
|
338
|
-
```
|
|
339
|
-
*)
|
|
340
|
-
|
|
341
|
-
external getMonth : t -> float = "getMonth"
|
|
342
|
-
[@@bs.send]
|
|
343
|
-
(**
|
|
344
|
-
Returns the month (0.0-11.0) for its argument, evaluated in the current time
|
|
345
|
-
zone. January is month zero. See
|
|
346
|
-
[`Date.getMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth)
|
|
347
|
-
on MDN.
|
|
348
|
-
|
|
349
|
-
```res example
|
|
350
|
-
Js.Date.getMonth(exampleDate) == 10.0
|
|
351
|
-
```
|
|
352
|
-
*)
|
|
353
|
-
|
|
354
|
-
external getSeconds : t -> float = "getSeconds"
|
|
355
|
-
[@@bs.send]
|
|
356
|
-
(**
|
|
357
|
-
Returns the seconds for its argument, evaluated in the current time zone. See
|
|
358
|
-
[`Date.getSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getSeconds)
|
|
359
|
-
on MDN.
|
|
360
|
-
|
|
361
|
-
```res example
|
|
362
|
-
Js.Date.getSeconds(exampleDate) == 54.0
|
|
363
|
-
```
|
|
364
|
-
*)
|
|
365
|
-
|
|
366
|
-
external getTime : t -> float = "getTime"
|
|
367
|
-
[@@bs.send]
|
|
368
|
-
(**
|
|
369
|
-
Returns the number of milliseconds since Unix epoch, evaluated in UTC. See
|
|
370
|
-
[`Date.getTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime)
|
|
371
|
-
on MDN.
|
|
372
|
-
|
|
373
|
-
```res example
|
|
374
|
-
Js.Date.getTime(exampleDate) == 123456654321.0
|
|
375
|
-
```
|
|
376
|
-
*)
|
|
377
|
-
|
|
378
|
-
external getTimezoneOffset : t -> float = "getTimezoneOffset"
|
|
379
|
-
[@@bs.send]
|
|
380
|
-
(**
|
|
381
|
-
Returns the time zone offset in minutes from the current time zone to UTC. See
|
|
382
|
-
[`Date.getTimezoneOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset)
|
|
383
|
-
on MDN.
|
|
384
|
-
|
|
385
|
-
```res example
|
|
386
|
-
Js.Date.getTimezoneOffset(exampleDate) == -60.0
|
|
387
|
-
```
|
|
388
|
-
*)
|
|
389
|
-
|
|
390
|
-
external getUTCDate : t -> float = "getUTCDate"
|
|
391
|
-
[@@bs.send]
|
|
392
|
-
(**
|
|
393
|
-
Returns the day of the month of the argument, evaluated in UTC. See
|
|
394
|
-
[`Date.getUTCDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDate)
|
|
395
|
-
on MDN.
|
|
396
|
-
|
|
397
|
-
```res example
|
|
398
|
-
Js.Date.getUTCDate(exampleDate) == 29.0
|
|
399
|
-
```
|
|
400
|
-
*)
|
|
401
|
-
|
|
402
|
-
external getUTCDay : t -> float = "getUTCDay"
|
|
403
|
-
[@@bs.send]
|
|
404
|
-
(**
|
|
405
|
-
Returns the day of the week of the argument, evaluated in UTC. The range of the
|
|
406
|
-
return value is 0.0-6.0, where Sunday is zero. See
|
|
407
|
-
[`Date.getUTCDay`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDay)
|
|
408
|
-
on MDN.
|
|
409
|
-
|
|
410
|
-
```res example
|
|
411
|
-
Js.Date.getUTCDay(exampleDate) == 4.0
|
|
412
|
-
```
|
|
413
|
-
*)
|
|
414
|
-
|
|
415
|
-
external getUTCFullYear : t -> float = "getUTCFullYear"
|
|
416
|
-
[@@bs.send]
|
|
417
|
-
(**
|
|
418
|
-
Returns the full year (as opposed to the range 0-99) for its argument. The
|
|
419
|
-
argument is evaluated in UTC. See
|
|
420
|
-
[`Date.getUTCFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear)
|
|
421
|
-
on MDN.
|
|
422
|
-
|
|
423
|
-
```res example
|
|
424
|
-
Js.Date.getUTCFullYear(exampleDate) == 1973.0
|
|
425
|
-
```
|
|
426
|
-
*)
|
|
427
|
-
|
|
428
|
-
external getUTCHours : t -> float = "getUTCHours"
|
|
429
|
-
[@@bs.send]
|
|
430
|
-
(**
|
|
431
|
-
Returns the hours for its argument, evaluated in the current time zone. See
|
|
432
|
-
[`Date.getUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCHours)
|
|
433
|
-
on MDN.
|
|
434
|
-
|
|
435
|
-
```res example
|
|
436
|
-
Js.Date.getUTCHours(exampleDate) == 21.0
|
|
437
|
-
```
|
|
438
|
-
*)
|
|
439
|
-
|
|
440
|
-
external getUTCMilliseconds : t -> float = "getUTCMilliseconds"
|
|
441
|
-
[@@bs.send]
|
|
442
|
-
(**
|
|
443
|
-
Returns the number of milliseconds for its argument, evaluated in UTC. See
|
|
444
|
-
[`Date.getUTCMilliseconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds)
|
|
445
|
-
on MDN.
|
|
446
|
-
|
|
447
|
-
```res example
|
|
448
|
-
Js.Date.getUTCMilliseconds(exampleDate) == 321.0
|
|
449
|
-
```
|
|
450
|
-
*)
|
|
451
|
-
|
|
452
|
-
external getUTCMinutes : t -> float = "getUTCMinutes"
|
|
453
|
-
[@@bs.send]
|
|
454
|
-
(**
|
|
455
|
-
Returns the number of minutes for its argument, evaluated in UTC. See
|
|
456
|
-
[`Date.getUTCMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes)
|
|
457
|
-
on MDN.
|
|
458
|
-
|
|
459
|
-
```res example
|
|
460
|
-
Js.Date.getUTCMinutes(exampleDate) == 30.0
|
|
461
|
-
```
|
|
462
|
-
*)
|
|
463
|
-
|
|
464
|
-
external getUTCMonth : t -> float = "getUTCMonth"
|
|
465
|
-
[@@bs.send]
|
|
466
|
-
(**
|
|
467
|
-
Returns the month (0.0-11.0) for its argument, evaluated in UTC. January is
|
|
468
|
-
month zero. See
|
|
469
|
-
[`Date.getUTCMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMonth)
|
|
470
|
-
on MDN.
|
|
471
|
-
|
|
472
|
-
```res example
|
|
473
|
-
Js.Date.getUTCMonth(exampleDate) == 10.0
|
|
474
|
-
```
|
|
475
|
-
*)
|
|
476
|
-
|
|
477
|
-
external getUTCSeconds : t -> float = "getUTCSeconds"
|
|
478
|
-
[@@bs.send]
|
|
479
|
-
(**
|
|
480
|
-
Returns the seconds for its argument, evaluated in UTC. See
|
|
481
|
-
[`Date.getUTCSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds)
|
|
482
|
-
on MDN.
|
|
483
|
-
|
|
484
|
-
```res example
|
|
485
|
-
Js.Date.getUTCSeconds(exampleDate) == 54.0
|
|
486
|
-
```
|
|
487
|
-
*)
|
|
488
|
-
|
|
489
|
-
external getYear : t -> float = "getYear"
|
|
490
|
-
[@@bs.send] [@@deprecated "Use `getFullYear` instead."]
|
|
491
|
-
|
|
492
|
-
external setDate : t -> float -> float = "setDate"
|
|
493
|
-
[@@bs.send]
|
|
494
|
-
(**
|
|
495
|
-
Sets the given `Date`’s day of month to the value in the second argument
|
|
496
|
-
according to the current time zone. Returns the number of milliseconds since
|
|
497
|
-
the epoch of the updated `Date`. *This function modifies the original `Date`.*
|
|
498
|
-
See
|
|
499
|
-
[`Date.setDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setDate)
|
|
500
|
-
on MDN.
|
|
501
|
-
|
|
502
|
-
```res example
|
|
503
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
504
|
-
let twoWeeksBefore = Js.Date.setDate(date1, 15.0)
|
|
505
|
-
date1 == Js.Date.fromString("1973-11-15T21:30:54.321Z00:00")
|
|
506
|
-
twoWeeksBefore == Js.Date.getTime(date1)
|
|
507
|
-
```
|
|
508
|
-
*)
|
|
509
|
-
|
|
510
|
-
external setFullYear : t -> float -> float = "setFullYear"
|
|
511
|
-
[@@bs.send]
|
|
512
|
-
(**
|
|
513
|
-
Sets the given `Date`’s year to the value in the second argument according to
|
|
514
|
-
the current time zone. Returns the number of milliseconds since the epoch of
|
|
515
|
-
the updated `Date`. *This function modifies the original `Date`.* See
|
|
516
|
-
[`Date.setFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear)
|
|
517
|
-
on MDN.
|
|
518
|
-
|
|
519
|
-
```res example
|
|
520
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
521
|
-
let nextYear = Js.Date.setFullYear(date1, 1974.0)
|
|
522
|
-
date1 == Js.Date.fromString("1974-11-15T21:30:54.321Z00:00")
|
|
523
|
-
nextYear == Js.Date.getTime(date1)
|
|
524
|
-
```
|
|
525
|
-
*)
|
|
526
|
-
|
|
527
|
-
external setFullYearM : t -> year:float -> month:float -> unit -> float
|
|
528
|
-
= "setFullYear"
|
|
529
|
-
[@@bs.send]
|
|
530
|
-
(**
|
|
531
|
-
Sets the given `Date`’s year and month to the values in the labeled arguments
|
|
532
|
-
according to the current time zone. Returns the number of milliseconds since
|
|
533
|
-
the epoch of the updated `Date`. *This function modifies the original `Date`.*
|
|
534
|
-
See
|
|
535
|
-
[`Date.setFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear)
|
|
536
|
-
on MDN.
|
|
537
|
-
|
|
538
|
-
```res example
|
|
539
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
540
|
-
let future = Js.Date.setFullYearM(date1, ~year=1974.0, ~month=0.0, ())
|
|
541
|
-
date1 == Js.Date.fromString("1974-01-22T21:30:54.321Z00:00")
|
|
542
|
-
future == Js.Date.getTime(date1)
|
|
543
|
-
```
|
|
544
|
-
*)
|
|
545
|
-
|
|
546
|
-
external setFullYearMD :
|
|
547
|
-
t -> year:float -> month:float -> date:float -> unit -> float = "setFullYear"
|
|
548
|
-
[@@bs.send]
|
|
549
|
-
(**
|
|
550
|
-
Sets the given `Date`’s year, month, and day of month to the values in the
|
|
551
|
-
labeled arguments according to the current time zone. Returns the number of
|
|
552
|
-
milliseconds since the epoch of the updated `Date`. *This function modifies the
|
|
553
|
-
original `Date`.* See
|
|
554
|
-
[`Date.setFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear)
|
|
555
|
-
on MDN.
|
|
556
|
-
|
|
557
|
-
```res example
|
|
558
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
559
|
-
let future = Js.Date.setFullYearMD(date1, ~year=1974.0, ~month=0.0, ~date=7.0, ())
|
|
560
|
-
date1 == Js.Date.fromString("1974-01-07T21:30:54.321Z00:00")
|
|
561
|
-
future == Js.Date.getTime(date1)
|
|
562
|
-
```
|
|
563
|
-
*)
|
|
564
|
-
|
|
565
|
-
external setHours : t -> float -> float = "setHours"
|
|
566
|
-
[@@bs.send]
|
|
567
|
-
(**
|
|
568
|
-
Sets the given `Date`’s hours to the value in the second argument according to
|
|
569
|
-
the current time zone. Returns the number of milliseconds since the epoch of
|
|
570
|
-
the updated `Date`. *This function modifies the original `Date`.* See
|
|
571
|
-
[`Date.setHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours)
|
|
572
|
-
on MDN.
|
|
573
|
-
|
|
574
|
-
```res example
|
|
575
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
576
|
-
let nextHour = Js.Date.setHours(date1, 22.0)
|
|
577
|
-
date1 == Js.Date.fromString("1973-11-29T22:30:54.321Z00:00")
|
|
578
|
-
nextHour == Js.Date.getTime(date1)
|
|
579
|
-
```
|
|
580
|
-
*)
|
|
581
|
-
|
|
582
|
-
external setHoursM : t -> hours:float -> minutes:float -> unit -> float
|
|
583
|
-
= "setHours"
|
|
584
|
-
[@@bs.send]
|
|
585
|
-
(**
|
|
586
|
-
Sets the given `Date`’s hours and minutes to the values in the labeled
|
|
587
|
-
arguments according to the current time zone. Returns the number of
|
|
588
|
-
milliseconds since the epoch of the updated `Date`. *This function modifies the
|
|
589
|
-
original `Date`.* See
|
|
590
|
-
[`Date.setHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours)
|
|
591
|
-
on MDN.
|
|
592
|
-
|
|
593
|
-
```res example
|
|
594
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
595
|
-
let futureTime = Js.Date.setHoursM(date1, ~hours=22.0, ~minutes=46.0, ())
|
|
596
|
-
date1 == Js.Date.fromString("1973-11-29T22:46:54.321Z00:00")
|
|
597
|
-
futureTime == Js.Date.getTime(date1)
|
|
598
|
-
```
|
|
599
|
-
*)
|
|
600
|
-
|
|
601
|
-
external setHoursMS :
|
|
602
|
-
t -> hours:float -> minutes:float -> seconds:float -> unit -> float
|
|
603
|
-
= "setHours"
|
|
604
|
-
[@@bs.send]
|
|
605
|
-
(**
|
|
606
|
-
Sets the given `Date`’s hours, minutes, and seconds to the values in the
|
|
607
|
-
labeled arguments according to the current time zone. Returns the number of
|
|
608
|
-
milliseconds since the epoch of the updated `Date`. *This function modifies the
|
|
609
|
-
original `Date`.* See
|
|
610
|
-
[`Date.setHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours)
|
|
611
|
-
on MDN.
|
|
612
|
-
|
|
613
|
-
```res example
|
|
614
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
615
|
-
let futureTime = Js.Date.setHoursMS(date1, ~hours=22.0, ~minutes=46.0, ~seconds=37.0, ())
|
|
616
|
-
date1 == Js.Date.fromString("1973-11-29T22:46:37.321Z00:00")
|
|
617
|
-
futureTime == Js.Date.getTime(date1)
|
|
618
|
-
```
|
|
619
|
-
*)
|
|
620
|
-
|
|
621
|
-
external setHoursMSMs :
|
|
622
|
-
t ->
|
|
623
|
-
hours:float ->
|
|
624
|
-
minutes:float ->
|
|
625
|
-
seconds:float ->
|
|
626
|
-
milliseconds:float ->
|
|
627
|
-
unit ->
|
|
628
|
-
float = "setHours"
|
|
629
|
-
[@@bs.send]
|
|
630
|
-
(**
|
|
631
|
-
Sets the given `Date`’s hours, minutes, seconds, and milliseconds to the values
|
|
632
|
-
in the labeled arguments according to the current time zone. Returns the number
|
|
633
|
-
of milliseconds since the epoch of the updated `Date`. *This function modifies
|
|
634
|
-
the original `Date`.* See
|
|
635
|
-
[`Date.setHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours)
|
|
636
|
-
on MDN.
|
|
637
|
-
|
|
638
|
-
```res example
|
|
639
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
640
|
-
let futureTime = Js.Date.setHoursMSMs(
|
|
641
|
-
date1,
|
|
642
|
-
~hours=22.0,
|
|
643
|
-
~minutes=46.0,
|
|
644
|
-
~seconds=37.0,
|
|
645
|
-
~milliseconds=494.0,
|
|
646
|
-
(),
|
|
647
|
-
)
|
|
648
|
-
date1 == Js.Date.fromString("1973-11-29T22:46:37.494Z00:00")
|
|
649
|
-
futureTime == Js.Date.getTime(date1)
|
|
650
|
-
```
|
|
651
|
-
*)
|
|
652
|
-
|
|
653
|
-
external setMilliseconds : t -> float -> float = "setMilliseconds"
|
|
654
|
-
[@@bs.send]
|
|
655
|
-
(**
|
|
656
|
-
Sets the given `Date`’s milliseconds to the value in the second argument
|
|
657
|
-
according to the current time zone. Returns the number of milliseconds since
|
|
658
|
-
the epoch of the updated `Date`. *This function modifies the original `Date`.*
|
|
659
|
-
See
|
|
660
|
-
[`Date.setMilliseconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds)
|
|
661
|
-
on MDN.
|
|
662
|
-
|
|
663
|
-
```res example
|
|
664
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
665
|
-
let futureTime = Js.Date.setMilliseconds(date1, 494.0)
|
|
666
|
-
date1 == Js.Date.fromString("1973-11-29T21:30:54.494Z00:00")
|
|
667
|
-
futureTime == Js.Date.getTime(date1)
|
|
668
|
-
```
|
|
669
|
-
*)
|
|
670
|
-
|
|
671
|
-
external setMinutes : t -> float -> float = "setMinutes"
|
|
672
|
-
[@@bs.send]
|
|
673
|
-
(**
|
|
674
|
-
Sets the given `Date`’s minutes to the value in the second argument according
|
|
675
|
-
to the current time zone. Returns the number of milliseconds since the epoch of
|
|
676
|
-
the updated `Date`. *This function modifies the original `Date`.* See
|
|
677
|
-
[`Date.setMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes)
|
|
678
|
-
on MDN.
|
|
679
|
-
|
|
680
|
-
```res example
|
|
681
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
682
|
-
let futureTime = Js.Date.setMinutes(date1, 34.0)
|
|
683
|
-
date1 == Js.Date.fromString("1973-11-29T21:34:54.494Z00:00")
|
|
684
|
-
futureTime == Js.Date.getTime(date1)
|
|
685
|
-
```
|
|
686
|
-
*)
|
|
687
|
-
|
|
688
|
-
external setMinutesS : t -> minutes:float -> seconds:float -> unit -> float
|
|
689
|
-
= "setMinutes"
|
|
690
|
-
[@@bs.send]
|
|
691
|
-
(**
|
|
692
|
-
Sets the given `Date`’s minutes and seconds to the values in the labeled
|
|
693
|
-
arguments according to the current time zone. Returns the number of
|
|
694
|
-
milliseconds since the epoch of the updated `Date`. *This function modifies the
|
|
695
|
-
original `Date`.* See
|
|
696
|
-
[`Date.setMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes)
|
|
697
|
-
on MDN.
|
|
698
|
-
|
|
699
|
-
```res example
|
|
700
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
701
|
-
let futureTime = Js.Date.setMinutesS(date1, ~minutes=34.0, ~seconds=56.0, ())
|
|
702
|
-
date1 == Js.Date.fromString("1973-11-29T21:34:56.494Z00:00")
|
|
703
|
-
futureTime == Js.Date.getTime(date1)
|
|
704
|
-
```
|
|
705
|
-
*)
|
|
706
|
-
|
|
707
|
-
external setMinutesSMs :
|
|
708
|
-
t -> minutes:float -> seconds:float -> milliseconds:float -> unit -> float
|
|
709
|
-
= "setMinutes"
|
|
710
|
-
[@@bs.send]
|
|
711
|
-
(**
|
|
712
|
-
Sets the given `Date`’s minutes, seconds, and milliseconds to the values in the
|
|
713
|
-
labeled arguments according to the current time zone. Returns the number of
|
|
714
|
-
milliseconds since the epoch of the updated `Date`. *This function modifies the
|
|
715
|
-
original `Date`.* See
|
|
716
|
-
[`Date.setMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes)
|
|
717
|
-
on MDN.
|
|
718
|
-
|
|
719
|
-
```res example
|
|
720
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
721
|
-
let futureTime = Js.Date.setMinutesSMs(
|
|
722
|
-
date1,
|
|
723
|
-
~minutes=34.0,
|
|
724
|
-
~seconds=56.0,
|
|
725
|
-
~milliseconds=789.0,
|
|
726
|
-
(),
|
|
727
|
-
)
|
|
728
|
-
date1 == Js.Date.fromString("1973-11-29T21:34:56.789Z00:00")
|
|
729
|
-
futureTime == Js.Date.getTime(date1)
|
|
730
|
-
```
|
|
731
|
-
*)
|
|
732
|
-
|
|
733
|
-
external setMonth : t -> float -> float = "setMonth"
|
|
734
|
-
[@@bs.send]
|
|
735
|
-
(**
|
|
736
|
-
Sets the given `Date`’s month to the value in the second argument according to
|
|
737
|
-
the current time zone. Returns the number of milliseconds since the epoch of
|
|
738
|
-
the updated `Date`. *This function modifies the original `Date`.* See
|
|
739
|
-
[`Date.setMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth)
|
|
740
|
-
on MDN.
|
|
741
|
-
|
|
742
|
-
```res example
|
|
743
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
744
|
-
let futureTime = Js.Date.setMonth(date1, 11.0)
|
|
745
|
-
date1 == Js.Date.fromString("1973-12-29T21:34:56.789Z00:00")
|
|
746
|
-
futureTime == Js.Date.getTime(date1)
|
|
747
|
-
```
|
|
748
|
-
*)
|
|
749
|
-
|
|
750
|
-
external setMonthD : t -> month:float -> date:float -> unit -> float
|
|
751
|
-
= "setMonth"
|
|
752
|
-
[@@bs.send]
|
|
753
|
-
(**
|
|
754
|
-
Sets the given `Date`’s month and day of month to the values in the labeled
|
|
755
|
-
arguments according to the current time zone. Returns the number of
|
|
756
|
-
milliseconds since the epoch of the updated `Date`. *This function modifies the
|
|
757
|
-
original `Date`.* See
|
|
758
|
-
[`Date.setMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth)
|
|
759
|
-
on MDN.
|
|
760
|
-
|
|
761
|
-
```res example
|
|
762
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
763
|
-
let futureTime = Js.Date.setMonthD(date1, ~month=11.0, ~date=8.0, ())
|
|
764
|
-
date1 == Js.Date.fromString("1973-12-08T21:34:56.789Z00:00")
|
|
765
|
-
futureTime == Js.Date.getTime(date1)
|
|
766
|
-
```
|
|
767
|
-
*)
|
|
768
|
-
|
|
769
|
-
external setSeconds : t -> float -> float = "setSeconds"
|
|
770
|
-
[@@bs.send]
|
|
771
|
-
(**
|
|
772
|
-
Sets the given `Date`’s seconds to the value in the second argument according
|
|
773
|
-
to the current time zone. Returns the number of milliseconds since the epoch of
|
|
774
|
-
the updated `Date`. *This function modifies the original `Date`.* See
|
|
775
|
-
[`Date.setSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setSeconds)
|
|
776
|
-
on MDN.
|
|
777
|
-
|
|
778
|
-
```res example
|
|
779
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
780
|
-
let futureTime = Js.Date.setSeconds(date1, 56.0)
|
|
781
|
-
date1 == Js.Date.fromString("1973-12-29T21:30:56.321Z00:00")
|
|
782
|
-
futureTime == Js.Date.getTime(date1)
|
|
783
|
-
```
|
|
784
|
-
*)
|
|
785
|
-
|
|
786
|
-
external setSecondsMs :
|
|
787
|
-
t -> seconds:float -> milliseconds:float -> unit -> float = "setSeconds"
|
|
788
|
-
[@@bs.send]
|
|
789
|
-
(**
|
|
790
|
-
Sets the given `Date`’s seconds and milliseconds to the values in the labeled
|
|
791
|
-
arguments according to the current time zone. Returns the number of
|
|
792
|
-
milliseconds since the epoch of the updated `Date`. *This function modifies the
|
|
793
|
-
original `Date`.* See
|
|
794
|
-
[`Date.setSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setSeconds)
|
|
795
|
-
on MDN.
|
|
796
|
-
|
|
797
|
-
```res example
|
|
798
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
799
|
-
let futureTime = Js.Date.setSecondsMs(date1, ~seconds=56.0, ~milliseconds=789.0, ())
|
|
800
|
-
date1 == Js.Date.fromString("1973-12-29T21:30:56.789Z00:00")
|
|
801
|
-
futureTime == Js.Date.getTime(date1)
|
|
802
|
-
```
|
|
803
|
-
*)
|
|
804
|
-
|
|
805
|
-
external setTime : t -> float -> float = "setTime"
|
|
806
|
-
[@@bs.send]
|
|
807
|
-
(**
|
|
808
|
-
Sets the given `Date`’s value in terms of milliseconds since the epoch. Returns
|
|
809
|
-
the number of milliseconds since the epoch of the updated `Date`. *This
|
|
810
|
-
function modifies the original `Date`.* See
|
|
811
|
-
[`Date.setTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setTime)
|
|
812
|
-
on MDN.
|
|
813
|
-
|
|
814
|
-
```res example
|
|
815
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
816
|
-
let futureTime = Js.Date.setTime(date1, 198765432101.0)
|
|
817
|
-
|
|
818
|
-
date1 == Js.Date.fromString("1976-04-19T12:37:12.101Z00:00")
|
|
819
|
-
futureTime == Js.Date.getTime(date1)
|
|
820
|
-
```
|
|
821
|
-
*)
|
|
822
|
-
|
|
823
|
-
external setUTCDate : t -> float -> float = "setUTCDate"
|
|
824
|
-
[@@bs.send]
|
|
825
|
-
(**
|
|
826
|
-
Sets the given `Date`’s day of month to the value in the second argument
|
|
827
|
-
according to UTC. Returns the number of milliseconds since the epoch of the
|
|
828
|
-
updated `Date`. *This function modifies the original `Date`.* See
|
|
829
|
-
[`Date.setUTCDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCDate)
|
|
830
|
-
on MDN.
|
|
831
|
-
|
|
832
|
-
```res example
|
|
833
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
834
|
-
let twoWeeksBefore = Js.Date.setUTCDate(date1, 15.0)
|
|
835
|
-
date1 == Js.Date.fromString("1973-11-15T21:30:54.321Z00:00")
|
|
836
|
-
twoWeeksBefore == Js.Date.getTime(date1)
|
|
837
|
-
```
|
|
838
|
-
*)
|
|
839
|
-
|
|
840
|
-
external setUTCFullYear : t -> float -> float = "setUTCFullYear"
|
|
841
|
-
[@@bs.send]
|
|
842
|
-
(**
|
|
843
|
-
Sets the given `Date`’s year to the value in the second argument according to
|
|
844
|
-
UTC. Returns the number of milliseconds since the epoch of the updated `Date`.
|
|
845
|
-
*This function modifies the original `Date`.* See
|
|
846
|
-
[`Date.setUTCFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear)
|
|
847
|
-
on MDN.
|
|
848
|
-
|
|
849
|
-
```res example
|
|
850
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
851
|
-
let nextYear = Js.Date.setUTCFullYear(date1, 1974.0)
|
|
852
|
-
date1 == Js.Date.fromString("1974-11-15T21:30:54.321Z00:00")
|
|
853
|
-
nextYear == Js.Date.getTime(date1)
|
|
854
|
-
```
|
|
855
|
-
*)
|
|
856
|
-
|
|
857
|
-
external setUTCFullYearM : t -> year:float -> month:float -> unit -> float
|
|
858
|
-
= "setUTCFullYear"
|
|
859
|
-
[@@bs.send]
|
|
860
|
-
(**
|
|
861
|
-
Sets the given `Date`’s year and month to the values in the labeled arguments
|
|
862
|
-
according to UTC. Returns the number of milliseconds since the epoch of the
|
|
863
|
-
updated `Date`. *This function modifies the original `Date`.* See
|
|
864
|
-
[`Date.setUTCFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear)
|
|
865
|
-
on MDN.
|
|
866
|
-
|
|
867
|
-
```res example
|
|
868
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
869
|
-
let future = Js.Date.setUTCFullYearM(date1, ~year=1974.0, ~month=0.0, ())
|
|
870
|
-
date1 == Js.Date.fromString("1974-01-22T21:30:54.321Z00:00")
|
|
871
|
-
future == Js.Date.getTime(date1)
|
|
872
|
-
```
|
|
873
|
-
*)
|
|
874
|
-
|
|
875
|
-
external setUTCFullYearMD :
|
|
876
|
-
t -> year:float -> month:float -> date:float -> unit -> float
|
|
877
|
-
= "setUTCFullYear"
|
|
878
|
-
[@@bs.send]
|
|
879
|
-
(**
|
|
880
|
-
Sets the given `Date`’s year, month, and day of month to the values in the
|
|
881
|
-
labeled arguments according to UTC. Returns the number of milliseconds since
|
|
882
|
-
the epoch of the updated `Date`. *This function modifies the original `Date`.*
|
|
883
|
-
See
|
|
884
|
-
[`Date.setUTCFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear)
|
|
885
|
-
on MDN.
|
|
886
|
-
|
|
887
|
-
```res example
|
|
888
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
889
|
-
let future = Js.Date.setUTCFullYearMD(date1, ~year=1974.0, ~month=0.0, ~date=7.0, ())
|
|
890
|
-
date1 == Js.Date.fromString("1974-01-07T21:30:54.321Z00:00")
|
|
891
|
-
future == Js.Date.getTime(date1)
|
|
892
|
-
```
|
|
893
|
-
*)
|
|
894
|
-
|
|
895
|
-
external setUTCHours : t -> float -> float = "setUTCHours"
|
|
896
|
-
[@@bs.send]
|
|
897
|
-
(**
|
|
898
|
-
Sets the given `Date`’s hours to the value in the second argument according to
|
|
899
|
-
UTC. Returns the number of milliseconds since the epoch of the updated `Date`.
|
|
900
|
-
*This function modifies the original `Date`.* See
|
|
901
|
-
[`Date.setUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours)
|
|
902
|
-
on MDN.
|
|
903
|
-
|
|
904
|
-
```res example
|
|
905
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
906
|
-
let nextHour = Js.Date.setUTCHours(date1, 22.0)
|
|
907
|
-
date1 == Js.Date.fromString("1973-11-29T22:30:54.321Z00:00")
|
|
908
|
-
nextHour == Js.Date.getTime(date1)
|
|
909
|
-
```
|
|
910
|
-
*)
|
|
911
|
-
|
|
912
|
-
external setUTCHoursM : t -> hours:float -> minutes:float -> unit -> float
|
|
913
|
-
= "setUTCHours"
|
|
914
|
-
[@@bs.send]
|
|
915
|
-
(**
|
|
916
|
-
Sets the given `Date`’s hours and minutes to the values in the labeled
|
|
917
|
-
arguments according to UTC. Returns the number of milliseconds since the epoch
|
|
918
|
-
of the updated `Date`. *This function modifies the original `Date`.* See
|
|
919
|
-
[`Date.setUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours)
|
|
920
|
-
on MDN.
|
|
921
|
-
|
|
922
|
-
```res example
|
|
923
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
924
|
-
let futureTime = Js.Date.setUTCHoursM(date1, ~hours=22.0, ~minutes=46.0, ())
|
|
925
|
-
date1 == Js.Date.fromString("1973-11-29T22:46:54.321Z00:00")
|
|
926
|
-
futureTime == Js.Date.getTime(date1)
|
|
927
|
-
```
|
|
928
|
-
*)
|
|
929
|
-
|
|
930
|
-
external setUTCHoursMS :
|
|
931
|
-
t -> hours:float -> minutes:float -> seconds:float -> unit -> float
|
|
932
|
-
= "setUTCHours"
|
|
933
|
-
[@@bs.send]
|
|
934
|
-
(**
|
|
935
|
-
Sets the given `Date`’s hours, minutes, and seconds to the values in the
|
|
936
|
-
labeled arguments according to UTC. Returns the number of milliseconds since
|
|
937
|
-
the epoch of the updated `Date`. *This function modifies the original `Date`.*
|
|
938
|
-
|
|
939
|
-
See
|
|
940
|
-
[`Date.setUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours)
|
|
941
|
-
on MDN.
|
|
942
|
-
|
|
943
|
-
```res example
|
|
944
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
945
|
-
let futureTime = Js.Date.setUTCHoursMS(date1, ~hours=22.0, ~minutes=46.0, ~seconds=37.0, ())
|
|
946
|
-
date1 == Js.Date.fromString("1973-11-29T22:46:37.321Z00:00")
|
|
947
|
-
futureTime == Js.Date.getTime(date1)
|
|
948
|
-
```
|
|
949
|
-
*)
|
|
950
|
-
|
|
951
|
-
external setUTCHoursMSMs :
|
|
952
|
-
t ->
|
|
953
|
-
hours:float ->
|
|
954
|
-
minutes:float ->
|
|
955
|
-
seconds:float ->
|
|
956
|
-
milliseconds:float ->
|
|
957
|
-
unit ->
|
|
958
|
-
float = "setUTCHours"
|
|
959
|
-
[@@bs.send]
|
|
960
|
-
(**
|
|
961
|
-
Sets the given `Date`’s hours, minutes, seconds, and milliseconds to the values
|
|
962
|
-
in the labeled arguments according to UTC. Returns the number of milliseconds
|
|
963
|
-
since the epoch of the updated `Date`. *This function modifies the original
|
|
964
|
-
`Date`.* See
|
|
965
|
-
[`Date.setUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours)
|
|
966
|
-
on MDN.
|
|
967
|
-
|
|
968
|
-
```res example
|
|
969
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
970
|
-
let futureTime = Js.Date.setUTCHoursMSMs(
|
|
971
|
-
date1,
|
|
972
|
-
~hours=22.0,
|
|
973
|
-
~minutes=46.0,
|
|
974
|
-
~seconds=37.0,
|
|
975
|
-
~milliseconds=494.0,
|
|
976
|
-
(),
|
|
977
|
-
)
|
|
978
|
-
date1 == Js.Date.fromString("1973-11-29T22:46:37.494Z00:00")
|
|
979
|
-
futureTime == Js.Date.getTime(date1)
|
|
980
|
-
```
|
|
981
|
-
*)
|
|
982
|
-
|
|
983
|
-
external setUTCMilliseconds : t -> float -> float = "setUTCMilliseconds"
|
|
984
|
-
[@@bs.send]
|
|
985
|
-
(**
|
|
986
|
-
Sets the given `Date`’s milliseconds to the value in the second argument
|
|
987
|
-
according to UTC. Returns the number of milliseconds since the epoch of the
|
|
988
|
-
updated `Date`. *This function modifies the original `Date`.* See
|
|
989
|
-
[`Date.setUTCMilliseconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds)
|
|
990
|
-
on MDN.
|
|
991
|
-
|
|
992
|
-
```res example
|
|
993
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
994
|
-
let futureTime = Js.Date.setUTCMilliseconds(date1, 494.0)
|
|
995
|
-
date1 == Js.Date.fromString("1973-11-29T21:30:54.494Z00:00")
|
|
996
|
-
futureTime == Js.Date.getTime(date1)
|
|
997
|
-
```
|
|
998
|
-
*)
|
|
999
|
-
|
|
1000
|
-
external setUTCMinutes : t -> float -> float = "setUTCMinutes"
|
|
1001
|
-
[@@bs.send]
|
|
1002
|
-
(**
|
|
1003
|
-
Sets the given `Date`’s minutes to the value in the second argument according
|
|
1004
|
-
to the current time zone. Returns the number of milliseconds since the epoch of
|
|
1005
|
-
the updated `Date`. *This function modifies the original `Date`.* See
|
|
1006
|
-
[`Date.setUTCMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes)
|
|
1007
|
-
on MDN.
|
|
1008
|
-
|
|
1009
|
-
```res example
|
|
1010
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
1011
|
-
let futureTime = Js.Date.setUTCMinutes(date1, 34.0)
|
|
1012
|
-
date1 == Js.Date.fromString("1973-11-29T21:34:54.494Z00:00")
|
|
1013
|
-
futureTime == Js.Date.getTime(date1)
|
|
1014
|
-
```
|
|
1015
|
-
*)
|
|
1016
|
-
|
|
1017
|
-
external setUTCMinutesS : t -> minutes:float -> seconds:float -> unit -> float
|
|
1018
|
-
= "setUTCMinutes"
|
|
1019
|
-
[@@bs.send]
|
|
1020
|
-
(**
|
|
1021
|
-
Sets the given `Date`’s minutes and seconds to the values in the labeled
|
|
1022
|
-
arguments according to UTC. Returns the number of milliseconds since the epoch
|
|
1023
|
-
of the updated `Date`. *This function modifies the original `Date`.* See
|
|
1024
|
-
[`Date.setUTCMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes)
|
|
1025
|
-
on MDN.
|
|
1026
|
-
|
|
1027
|
-
```res example
|
|
1028
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
1029
|
-
let futureTime = Js.Date.setUTCMinutesS(date1, ~minutes=34.0, ~seconds=56.0, ())
|
|
1030
|
-
date1 == Js.Date.fromString("1973-11-29T21:34:56.494Z00:00")
|
|
1031
|
-
futureTime == Js.Date.getTime(date1)
|
|
1032
|
-
```
|
|
1033
|
-
*)
|
|
1034
|
-
|
|
1035
|
-
external setUTCMinutesSMs :
|
|
1036
|
-
t -> minutes:float -> seconds:float -> milliseconds:float -> unit -> float
|
|
1037
|
-
= "setUTCMinutes"
|
|
1038
|
-
[@@bs.send]
|
|
1039
|
-
(**
|
|
1040
|
-
Sets the given `Date`’s minutes, seconds, and milliseconds to the values in the
|
|
1041
|
-
labeled arguments according to UTC. Returns the number of milliseconds since
|
|
1042
|
-
the epoch of the updated `Date`. *This function modifies the original `Date`.*
|
|
1043
|
-
See
|
|
1044
|
-
[`Date.setUTCMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes)
|
|
1045
|
-
on MDN.
|
|
1046
|
-
|
|
1047
|
-
```res example
|
|
1048
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
1049
|
-
let futureTime = Js.Date.setUTCMinutesSMs(
|
|
1050
|
-
date1,
|
|
1051
|
-
~minutes=34.0,
|
|
1052
|
-
~seconds=56.0,
|
|
1053
|
-
~milliseconds=789.0,
|
|
1054
|
-
(),
|
|
1055
|
-
)
|
|
1056
|
-
date1 == Js.Date.fromString("1973-11-29T21:34:56.789Z00:00")
|
|
1057
|
-
futureTime == Js.Date.getTime(date1)
|
|
1058
|
-
```
|
|
1059
|
-
*)
|
|
1060
|
-
|
|
1061
|
-
external setUTCMonth : t -> float -> float = "setUTCMonth"
|
|
1062
|
-
[@@bs.send]
|
|
1063
|
-
(**
|
|
1064
|
-
Sets the given `Date`’s month to the value in the second argument according to
|
|
1065
|
-
UTC. Returns the number of milliseconds since the epoch of the updated `Date`.
|
|
1066
|
-
*This function modifies the original `Date`.* See
|
|
1067
|
-
[`Date.setUTCMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth)
|
|
1068
|
-
on MDN.
|
|
1069
|
-
|
|
1070
|
-
```res example
|
|
1071
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
1072
|
-
let futureTime = Js.Date.setUTCMonth(date1, 11.0)
|
|
1073
|
-
date1 == Js.Date.fromString("1973-12-29T21:34:56.789Z00:00")
|
|
1074
|
-
futureTime == Js.Date.getTime(date1)
|
|
1075
|
-
```
|
|
1076
|
-
*)
|
|
1077
|
-
|
|
1078
|
-
external setUTCMonthD : t -> month:float -> date:float -> unit -> float
|
|
1079
|
-
= "setUTCMonth"
|
|
1080
|
-
[@@bs.send]
|
|
1081
|
-
(**
|
|
1082
|
-
Sets the given `Date`’s month and day of month to the values in the labeled
|
|
1083
|
-
arguments according to UTC. Returns the number of milliseconds since the epoch
|
|
1084
|
-
of the updated `Date`. *This function modifies the original `Date`.* See
|
|
1085
|
-
[`Date.setUTCMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth)
|
|
1086
|
-
on MDN.
|
|
1087
|
-
|
|
1088
|
-
```res example
|
|
1089
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
1090
|
-
let futureTime = Js.Date.setUTCMonthD(date1, ~month=11.0, ~date=8.0, ())
|
|
1091
|
-
date1 == Js.Date.fromString("1973-12-08T21:34:56.789Z00:00")
|
|
1092
|
-
futureTime == Js.Date.getTime(date1)
|
|
1093
|
-
```
|
|
1094
|
-
*)
|
|
1095
|
-
|
|
1096
|
-
external setUTCSeconds : t -> float -> float = "setUTCSeconds"
|
|
1097
|
-
[@@bs.send]
|
|
1098
|
-
(**
|
|
1099
|
-
Sets the given `Date`’s seconds to the value in the second argument according
|
|
1100
|
-
to UTC. Returns the number of milliseconds since the epoch of the updated
|
|
1101
|
-
`Date`. *This function modifies the original `Date`.* See
|
|
1102
|
-
[`Date.setUTCSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds)
|
|
1103
|
-
on MDN.
|
|
1104
|
-
|
|
1105
|
-
```res example
|
|
1106
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
1107
|
-
let futureTime = Js.Date.setUTCSeconds(date1, 56.0)
|
|
1108
|
-
date1 == Js.Date.fromString("1973-12-29T21:30:56.321Z00:00")
|
|
1109
|
-
futureTime == Js.Date.getTime(date1)
|
|
1110
|
-
```
|
|
1111
|
-
*)
|
|
1112
|
-
|
|
1113
|
-
external setUTCSecondsMs :
|
|
1114
|
-
t -> seconds:float -> milliseconds:float -> unit -> float = "setUTCSeconds"
|
|
1115
|
-
[@@bs.send]
|
|
1116
|
-
(**
|
|
1117
|
-
Sets the given `Date`’s seconds and milliseconds to the values in the labeled
|
|
1118
|
-
arguments according to UTC. Returns the number of milliseconds since the epoch
|
|
1119
|
-
of the updated `Date`. *This function modifies the original `Date`.* See
|
|
1120
|
-
[`Date.setUTCSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds)
|
|
1121
|
-
on MDN.
|
|
1122
|
-
|
|
1123
|
-
```res example
|
|
1124
|
-
let date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT
|
|
1125
|
-
let futureTime = Js.Date.setUTCSecondsMs(date1, ~seconds=56.0, ~milliseconds=789.0, ())
|
|
1126
|
-
date1 == Js.Date.fromString("1973-12-29T21:30:56.789Z00:00")
|
|
1127
|
-
futureTime == Js.Date.getTime(date1)
|
|
1128
|
-
```
|
|
1129
|
-
*)
|
|
1130
|
-
|
|
1131
|
-
external setUTCTime : t -> float -> float = "setTime"
|
|
1132
|
-
[@@bs.send]
|
|
1133
|
-
(** Same as [`setTime()`](#settime). *)
|
|
1134
|
-
|
|
1135
|
-
external setYear : t -> float -> float = "setYear"
|
|
1136
|
-
[@@bs.send] [@@deprecated "Use `setFullYear` instead"]
|
|
1137
|
-
|
|
1138
|
-
external toDateString : t -> string = "toDateString"
|
|
1139
|
-
[@@bs.send]
|
|
1140
|
-
(**
|
|
1141
|
-
Returns the date (day of week, year, month, and day of month) portion of a
|
|
1142
|
-
`Date` in English. See
|
|
1143
|
-
[`Date.toDateString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString)
|
|
1144
|
-
on MDN.
|
|
1145
|
-
|
|
1146
|
-
```res example
|
|
1147
|
-
Js.Date.toDateString(exampleDate) == "Thu Nov 29 1973"
|
|
1148
|
-
```
|
|
1149
|
-
*)
|
|
1150
|
-
|
|
1151
|
-
external toGMTString : t -> string = "toGMTString"
|
|
1152
|
-
[@@bs.send] [@@deprecated "Use `toUTCString` instead"]
|
|
1153
|
-
|
|
1154
|
-
external toISOString : t -> string = "toISOString"
|
|
1155
|
-
[@@bs.send]
|
|
1156
|
-
(**
|
|
1157
|
-
Returns a simplified version of the ISO 8601 format for the date. See
|
|
1158
|
-
[`Date.toISOString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
|
1159
|
-
on MDN.
|
|
1160
|
-
|
|
1161
|
-
```res example
|
|
1162
|
-
Js.Date.toISOString(exampleDate) == "1973-11-29T21:30:54.321Z"
|
|
1163
|
-
```
|
|
1164
|
-
*)
|
|
1165
|
-
|
|
1166
|
-
external toJSON : t -> string = "toJSON"
|
|
1167
|
-
[@@bs.send]
|
|
1168
|
-
[@@deprecated
|
|
1169
|
-
"This method is unsafe. It will be changed to return option in a future \
|
|
1170
|
-
release. Please use toJSONUnsafe instead."]
|
|
1171
|
-
|
|
1172
|
-
external toJSONUnsafe : t -> string = "toJSON"
|
|
1173
|
-
[@@bs.send]
|
|
1174
|
-
(**
|
|
1175
|
-
Returns a string representation of the given date. See
|
|
1176
|
-
[`Date.toJSON`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON)
|
|
1177
|
-
on MDN.
|
|
1178
|
-
*)
|
|
1179
|
-
|
|
1180
|
-
external toLocaleDateString : t -> string = "toLocaleDateString"
|
|
1181
|
-
[@@bs.send]
|
|
1182
|
-
(**
|
|
1183
|
-
Returns the year, month, and day for the given `Date` in the current locale
|
|
1184
|
-
format. See
|
|
1185
|
-
[`Date.toLocaleDateString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString)
|
|
1186
|
-
on MDN.
|
|
1187
|
-
|
|
1188
|
-
```res example
|
|
1189
|
-
Js.Date.toLocaleDateString(exampleDate) == "11/29/1973" // for en_US.utf8
|
|
1190
|
-
Js.Date.toLocaleDateString(exampleDate) == "29.11.73" // for de_DE.utf8
|
|
1191
|
-
```
|
|
1192
|
-
*)
|
|
1193
|
-
(* TODO: has overloads with somewhat poor browser support *)
|
|
1194
|
-
|
|
1195
|
-
external toLocaleString : t -> string = "toLocaleString"
|
|
1196
|
-
[@@bs.send]
|
|
1197
|
-
(**
|
|
1198
|
-
Returns the time and date for the given `Date` in the current locale format.
|
|
1199
|
-
See
|
|
1200
|
-
[`Date.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString)
|
|
1201
|
-
on MDN.
|
|
1202
|
-
|
|
1203
|
-
```res example
|
|
1204
|
-
Js.Date.toLocaleString(exampleDate) == "11/29/1973, 10:30:54 PM" // for en_US.utf8
|
|
1205
|
-
Js.Date.toLocaleString(exampleDate) == "29.11.1973, 22:30:54" // for de_DE.utf8
|
|
1206
|
-
```
|
|
1207
|
-
*)
|
|
1208
|
-
(* TODO: has overloads with somewhat poor browser support *)
|
|
1209
|
-
|
|
1210
|
-
external toLocaleTimeString : t -> string = "toLocaleTimeString"
|
|
1211
|
-
[@@bs.send]
|
|
1212
|
-
(**
|
|
1213
|
-
Returns the time of day for the given `Date` in the current locale format. See
|
|
1214
|
-
[`Date.toLocaleTimeString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString)
|
|
1215
|
-
on MDN.
|
|
1216
|
-
|
|
1217
|
-
```res example
|
|
1218
|
-
Js.Date.toLocaleString(exampleDate) == "10:30:54 PM" // for en_US.utf8
|
|
1219
|
-
Js.Date.toLocaleString(exampleDate) == "22:30:54" // for de_DE.utf8
|
|
1220
|
-
```
|
|
1221
|
-
*)
|
|
1222
|
-
(* TODO: has overloads with somewhat poor browser support *)
|
|
1223
|
-
|
|
1224
|
-
external toString : t -> string = "toString"
|
|
1225
|
-
[@@bs.send]
|
|
1226
|
-
(**
|
|
1227
|
-
Returns a string representing the date and time of day for the given `Date` in
|
|
1228
|
-
the current locale and time zone. See
|
|
1229
|
-
[`Date.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toString)
|
|
1230
|
-
on MDN.
|
|
1231
|
-
|
|
1232
|
-
```res example
|
|
1233
|
-
Js.Date.toString(
|
|
1234
|
-
exampleDate,
|
|
1235
|
-
) == "Thu Nov 29 1973 22:30:54 GMT+0100 (Central European Standard Time)"
|
|
1236
|
-
```
|
|
1237
|
-
*)
|
|
1238
|
-
|
|
1239
|
-
external toTimeString : t -> string = "toTimeString"
|
|
1240
|
-
[@@bs.send]
|
|
1241
|
-
(**
|
|
1242
|
-
Returns a string representing the time of day for the given `Date` in the
|
|
1243
|
-
current locale and time zone. See
|
|
1244
|
-
[`Date.toTimeString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString)
|
|
1245
|
-
on MDN.
|
|
1246
|
-
|
|
1247
|
-
```res example
|
|
1248
|
-
Js.Date.toTimeString(exampleDate) == "22:30:54 GMT+0100 (Central European Standard Time)"
|
|
1249
|
-
```
|
|
1250
|
-
*)
|
|
1251
|
-
|
|
1252
|
-
external toUTCString : t -> string = "toUTCString"
|
|
1253
|
-
[@@bs.send]
|
|
1254
|
-
(**
|
|
1255
|
-
Returns a string representing the date and time of day for the given `Date` in
|
|
1256
|
-
the current locale and UTC (GMT time zone). See
|
|
1257
|
-
[`Date.toUTCString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString)
|
|
1258
|
-
on MDN.
|
|
1259
|
-
|
|
1260
|
-
```res example
|
|
1261
|
-
Js.Date.toUTCString(exampleDate) == "Thu, 29 Nov 1973 21:30:54 GMT"
|
|
1262
|
-
```
|
|
1263
|
-
*)
|