File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -346,9 +346,16 @@ then (
346
346
(intl##._PluralRules##supportedLocalesOf
347
347
(jas [| "ban"; "id-u-co-pinyin"; "de-ID" |])
348
348
(def options))
349
+
350
+ let options = Intl.RelativeTimeFormat.options () in
351
+ let () = options##.numeric := def (string "auto") in
352
+ let () = options##.style := def (string "short") in
353
+ let th_rtf = new%js Intl.relativeTimeFormat_constr (def (jas [| "th-TH" |])) (def options) in
354
+ fc (th_rtf##.format -1 "day");
349
355
with Error err -> Console.console##debug (string (string_of_error err)))
350
356
else Console.console##debug (string "Intl is not supported!")
351
357
]}
358
+
352
359
@see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl> for API documentation.
353
360
@see <https://www.ecma-international.org/ecma-402/1.0/> for the ECMAScript specification. *)
354
361
You can’t perform that action at this time.
0 commit comments