Skip to content

Commit 067efd3

Browse files
committed
comment test / doc
Not entirely sure what these are or how they work
1 parent 854202b commit 067efd3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/js_of_ocaml/intl.mli

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,16 @@ then (
346346
(intl##._PluralRules##supportedLocalesOf
347347
(jas [| "ban"; "id-u-co-pinyin"; "de-ID" |])
348348
(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");
349355
with Error err -> Console.console##debug (string (string_of_error err)))
350356
else Console.console##debug (string "Intl is not supported!")
351357
]}
358+
352359
@see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl> for API documentation.
353360
@see <https://www.ecma-international.org/ecma-402/1.0/> for the ECMAScript specification. *)
354361

0 commit comments

Comments
 (0)