summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/package/lib/ICU4XWeekOf.js
diff options
context:
space:
mode:
Diffstat (limited to 'intl/icu_capi/js/package/lib/ICU4XWeekOf.js')
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekOf.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekOf.js b/intl/icu_capi/js/package/lib/ICU4XWeekOf.js
new file mode 100644
index 0000000000..5f74b5d1a5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekOf.js
@@ -0,0 +1,10 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+export class ICU4XWeekOf {
+ constructor(underlying) {
+ this.week = (new Uint16Array(wasm.memory.buffer, underlying, 1))[0];
+ this.unit = ICU4XWeekRelativeUnit_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ }
+}