mol_time_all 1.1.1694 → 1.1.1695

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/node.d.ts CHANGED
@@ -17,8 +17,8 @@ declare namespace $ {
17
17
  declare namespace $ {
18
18
  class $mol_time_base {
19
19
  static patterns: Record<string, (arg: any) => string>;
20
- static formatter(pattern: string): (arg: any) => string;
21
- toString(pattern: string): string;
20
+ static formatter(pattern: string): (arg: any, lang?: string) => string;
21
+ toString(pattern: string, lang?: string): string;
22
22
  }
23
23
  }
24
24
 
@@ -156,25 +156,27 @@ declare namespace $ {
156
156
  toOffset(config?: $mol_time_duration_config): $mol_time_moment;
157
157
  valueOf(): number;
158
158
  toJSON(): string;
159
- toString(pattern?: string): string;
159
+ toString(pattern?: string, lang?: string): string;
160
160
  toArray(): readonly [number | undefined, number | undefined, number | undefined, number | undefined, number | undefined, number | undefined, number | undefined];
161
161
  [Symbol.toPrimitive](mode: 'default' | 'number' | 'string'): string | number;
162
162
  [$mol_dev_format_head](): any[];
163
+ protected static formatters: Record<string, Record<string, Intl.DateTimeFormat>>;
164
+ static intl(lang: string | undefined, pattern: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
163
165
  static patterns: {
164
166
  YYYY: (moment: $mol_time_moment) => string;
165
167
  AD: (moment: $mol_time_moment) => string;
166
168
  YY: (moment: $mol_time_moment) => string;
167
- Month: (moment: $mol_time_moment) => string;
168
- 'DD Month': (moment: $mol_time_moment) => string;
169
- 'D Month': (moment: $mol_time_moment) => string;
170
- Mon: (moment: $mol_time_moment) => string;
171
- 'DD Mon': (moment: $mol_time_moment) => string;
172
- 'D Mon': (moment: $mol_time_moment) => string;
169
+ Month: (moment: $mol_time_moment, lang?: string) => string;
170
+ 'DD Month': (moment: $mol_time_moment, lang?: string) => string;
171
+ 'D Month': (moment: $mol_time_moment, lang?: string) => string;
172
+ Mon: (moment: $mol_time_moment, lang?: string) => string;
173
+ 'DD Mon': (moment: $mol_time_moment, lang?: string) => string;
174
+ 'D Mon': (moment: $mol_time_moment, lang?: string) => string;
173
175
  '-MM': (moment: $mol_time_moment) => string;
174
176
  MM: (moment: $mol_time_moment) => string;
175
177
  M: (moment: $mol_time_moment) => string;
176
- WeekDay: (moment: $mol_time_moment) => string;
177
- WD: (moment: $mol_time_moment) => string;
178
+ WeekDay: (moment: $mol_time_moment, lang?: string) => string;
179
+ WD: (moment: $mol_time_moment, lang?: string) => string;
178
180
  '-DD': (moment: $mol_time_moment) => string;
179
181
  DD: (moment: $mol_time_moment) => string;
180
182
  D: (moment: $mol_time_moment) => string;
package/node.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../mam.d.ts","../../base/base.d.ts","../../duration/duration.d.ts","../../../fail/fail.d.ts","../../../fail/hidden/hidden.d.ts","../../../dev/format/format.d.ts","../../moment/moment.d.ts","../../interval/interval.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpDA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null]}
1
+ {"version":3,"sources":["../../../../mam.d.ts","../../base/base.d.ts","../../duration/duration.d.ts","../../../fail/fail.d.ts","../../../fail/hidden/hidden.d.ts","../../../dev/format/format.d.ts","../../moment/moment.d.ts","../../interval/interval.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpDA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null]}
package/node.deps.json CHANGED
@@ -1 +1 @@
1
- {"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/time/readme.md","mol/time/base/base.ts","mol/time/duration/readme.md","mol/time/duration/duration.ts","mol/fail/fail.ts","mol/fail/hidden/hidden.ts","mol/dev/format/format.ts","mol/time/moment/moment.ts","mol/time/moment/readme.md","mol/time/interval/readme.md","mol/time/interval/interval.ts","mol/time/all/package.json","mol/time/all/all.meta.tree"],"mods":{},"deps_in":{"mol/time":{"mol/time/all":-999,"mol/time/moment":-999,"mol/time/duration":-999,"mol/time/base":-999,"mol/time/interval":-999},"mol":{"mol/time":-999,"mol/fail":-999,"mol/dev":-999},"":{"mol":-999},"mol/time/moment":{"mol/time/all":-999,"mol/time/interval":-2},"mol/time/duration":{"mol/time/moment":-2,"mol/time/all":-999,"mol/time/interval":-2},"mol/time/base":{"mol/time/duration":-1,"mol/time/moment":-1,"mol/time/interval":-1},"mol/fail":{"mol/time/moment":-2,"mol/fail/hidden":-999},"mol/dev/format":{"mol/time/moment":-2},"mol/dev":{"mol/dev/format":-999},"mol/fail/hidden":{"mol/dev/format":-5},"mol/time/interval":{"mol/time/all":-999}},"deps_out":{"mol/time/all":{"mol/time":-999,"mol/time/moment":-999,"mol/time/duration":-999,"mol/time/interval":-999},"mol/time":{"mol":-999},"mol":{"":-999},"mol/time/moment":{"mol/time":-999,"mol/time/duration":-2,"mol/fail":-2,"mol/time/base":-1,"mol/dev/format":-2},"mol/time/duration":{"mol/time":-999,"mol/time/base":-1},"mol/time/base":{"mol/time":-999},"mol/fail":{"mol":-999},"mol/dev/format":{"mol/dev":-999,"mol/fail/hidden":-5},"mol/dev":{"mol":-999},"mol/fail/hidden":{"mol/fail":-999},"mol/time/interval":{"mol/time":-999,"mol/time/moment":-2,"mol/time/duration":-2,"mol/time/base":-1}},"sloc":{"ts":917,"LICENSE":113,"md":713,"js":9,"json":86,"tree":44,"CNAME":1},"deps":{"mol/time/all":{"..":-999,"/mol/time/moment":-999,"/mol/time/duration":-999,"/mol/time/interval":-999},"mol/time":{"..":-999},"mol":{"..":-999},"":{},"mol/time/moment":{"..":-999,"/mol/time/moment/weekdays":-1,"/mol/time/moment/config":-1,"/mol/time/duration/config":-2,"/mol/fail":-2,"/mol/time/moment":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/dev/format/head":-2,"/mol/dev/format/span":-3,"/mol/dev/format/native":-4,"/mol/dev/format/accent":-4,"/mol/time/moment/patterns":-4},"mol/time/duration":{"..":-999,"/mol/time/duration/config":-1,"/mol/time/duration":-1,"/mol/time/base":-1,"/mol/time/moment":-3,"/mol/time/moment/patterns":-4},"mol/time/base":{"..":-999,"/mol/time/base":-1},"mol/fail":{"..":-999,"/mol/fail":-1},"mol/dev/format":{"..":-999,"/mol/dev/format/register":-1,"/mol/dev/format/head":-1,"/mol/dev/format/body":-1,"/mol/dev/format/button":-1,"/mol/dev/format/auto":-1,"/mol/dev/format/span":-1,"/mol/dev/format/accent":-1,"/mol/dev/format/native":-1,"/mol/fail/hidden":-5,"/mol/dev/format/shade":-1,"/mol/dev/format/element":-1,"/mol/dev/format/element/bind":-1,"/mol/dev/format/div":-1,"/mol/dev/format/ol":-1,"/mol/dev/format/li":-1,"/mol/dev/format/table":-1,"/mol/dev/format/tr":-1,"/mol/dev/format/td":-1,"/mol/dev/format/span/bind":-1,"/mol/dev/format/strong":-1,"/mol/dev/format/string":-1,"/mol/dev/format/indent":-1,"/mol/dev/format/div/bind":-1},"mol/dev":{"..":-999},"mol/fail/hidden":{"..":-999,"/mol/fail/hidden":-1},"mol/time/interval":{"..":-999,"/mol/time/interval/config":-1,"/mol/time/moment/config":-2,"/mol/time/duration/config":-2,"/mol/time/interval":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment":-2}}}
1
+ {"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/time/readme.md","mol/time/base/base.ts","mol/time/duration/readme.md","mol/time/duration/duration.ts","mol/fail/fail.ts","mol/fail/hidden/hidden.ts","mol/dev/format/format.ts","mol/time/moment/moment.ts","mol/time/moment/readme.md","mol/time/interval/readme.md","mol/time/interval/interval.ts","mol/time/all/package.json","mol/time/all/all.meta.tree"],"mods":{},"deps_in":{"mol/time":{"mol/time/all":-999,"mol/time/moment":-999,"mol/time/duration":-999,"mol/time/base":-999,"mol/time/interval":-999},"mol":{"mol/time":-999,"mol/fail":-999,"mol/dev":-999},"":{"mol":-999},"mol/time/moment":{"mol/time/all":-999,"mol/time/interval":-2},"mol/time/duration":{"mol/time/moment":-2,"mol/time/all":-999,"mol/time/interval":-2},"mol/time/base":{"mol/time/duration":-1,"mol/time/moment":-1,"mol/time/interval":-1},"mol/fail":{"mol/time/moment":-2,"mol/fail/hidden":-999},"mol/dev/format":{"mol/time/moment":-2},"mol/dev":{"mol/dev/format":-999},"mol/fail/hidden":{"mol/dev/format":-5},"mol/time/interval":{"mol/time/all":-999}},"deps_out":{"mol/time/all":{"mol/time":-999,"mol/time/moment":-999,"mol/time/duration":-999,"mol/time/interval":-999},"mol/time":{"mol":-999},"mol":{"":-999},"mol/time/moment":{"mol/time":-999,"mol/time/duration":-2,"mol/fail":-2,"mol/time/base":-1,"mol/dev/format":-2},"mol/time/duration":{"mol/time":-999,"mol/time/base":-1},"mol/time/base":{"mol/time":-999},"mol/fail":{"mol":-999},"mol/dev/format":{"mol/dev":-999,"mol/fail/hidden":-5},"mol/dev":{"mol":-999},"mol/fail/hidden":{"mol/fail":-999},"mol/time/interval":{"mol/time":-999,"mol/time/moment":-2,"mol/time/duration":-2,"mol/time/base":-1}},"sloc":{"ts":915,"LICENSE":113,"md":715,"js":9,"json":87,"tree":44,"CNAME":1},"deps":{"mol/time/all":{"..":-999,"/mol/time/moment":-999,"/mol/time/duration":-999,"/mol/time/interval":-999},"mol/time":{"..":-999},"mol":{"..":-999},"":{},"mol/time/moment":{"..":-999,"/mol/time/moment/weekdays":-1,"/mol/time/moment/config":-1,"/mol/time/duration/config":-2,"/mol/fail":-2,"/mol/time/moment":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/dev/format/head":-2,"/mol/dev/format/span":-3,"/mol/dev/format/native":-4,"/mol/dev/format/accent":-4,"/mol/time/moment/intl":-4,"/mol/time/moment/patterns":-4},"mol/time/duration":{"..":-999,"/mol/time/duration/config":-1,"/mol/time/duration":-1,"/mol/time/base":-1,"/mol/time/moment":-3,"/mol/time/moment/patterns":-4},"mol/time/base":{"..":-999,"/mol/time/base":-1},"mol/fail":{"..":-999,"/mol/fail":-1},"mol/dev/format":{"..":-999,"/mol/dev/format/register":-1,"/mol/dev/format/head":-1,"/mol/dev/format/body":-1,"/mol/dev/format/button":-1,"/mol/dev/format/auto":-1,"/mol/dev/format/span":-1,"/mol/dev/format/accent":-1,"/mol/dev/format/native":-1,"/mol/fail/hidden":-5,"/mol/dev/format/shade":-1,"/mol/dev/format/element":-1,"/mol/dev/format/element/bind":-1,"/mol/dev/format/div":-1,"/mol/dev/format/ol":-1,"/mol/dev/format/li":-1,"/mol/dev/format/table":-1,"/mol/dev/format/tr":-1,"/mol/dev/format/td":-1,"/mol/dev/format/span/bind":-1,"/mol/dev/format/strong":-1,"/mol/dev/format/string":-1,"/mol/dev/format/indent":-1,"/mol/dev/format/div/bind":-1},"mol/dev":{"..":-999},"mol/fail/hidden":{"..":-999,"/mol/fail/hidden":-1},"mol/time/interval":{"..":-999,"/mol/time/interval/config":-1,"/mol/time/moment/config":-2,"/mol/time/duration/config":-2,"/mol/time/interval":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment":-2}}}
package/node.js CHANGED
@@ -50,14 +50,14 @@ var $;
50
50
  funcs.push(this.patterns[token]);
51
51
  return str;
52
52
  });
53
- return this.patterns[pattern] = (arg) => {
54
- return funcs.reduce((res, func) => res + func(arg), '');
53
+ return this.patterns[pattern] = (arg, lang) => {
54
+ return funcs.reduce((res, func) => res + func(arg, lang), '');
55
55
  };
56
56
  }
57
- toString(pattern) {
57
+ toString(pattern, lang) {
58
58
  const Base = this.constructor;
59
59
  const formatter = Base.formatter(pattern);
60
- return formatter(this);
60
+ return formatter(this, lang);
61
61
  }
62
62
  }
63
63
  $.$mol_time_base = $mol_time_base;
@@ -445,7 +445,7 @@ var $;
445
445
  'color': 'gray',
446
446
  });
447
447
  $.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
448
- 'margin-left': '13px'
448
+ 'margin-inline-start': '13px'
449
449
  });
450
450
  class Stack extends Array {
451
451
  // [ Symbol.toPrimitive ]() {
@@ -700,8 +700,8 @@ var $;
700
700
  }
701
701
  valueOf() { return this.native.getTime(); }
702
702
  toJSON() { return this.toString(); }
703
- toString(pattern = 'YYYY-MM-DDThh:mm:ss.sssZ') {
704
- return super.toString(pattern);
703
+ toString(pattern = 'YYYY-MM-DDThh:mm:ss.sssZ', lang) {
704
+ return super.toString(pattern, lang);
705
705
  }
706
706
  toArray() {
707
707
  return [this.year, this.month, this.day, this.hour, this.minute, this.second, this.offset?.count('PT1m')];
@@ -712,6 +712,12 @@ var $;
712
712
  [$mol_dev_format_head]() {
713
713
  return $mol_dev_format_span({}, $mol_dev_format_native(this), ' ', $mol_dev_format_accent(this.toString('YYYY-MM-DD hh:mm:ss.sss Z')));
714
714
  }
715
+ static formatters = {};
716
+ static intl(lang, pattern, options) {
717
+ const group = this.formatters[lang ?? ''] ?? (this.formatters[lang ?? ''] = {});
718
+ group[pattern] = group[pattern] ?? new Intl.DateTimeFormat(lang, options);
719
+ return group[pattern];
720
+ }
715
721
  /// Mnemonics:
716
722
  /// * single letter for numbers: M - month number, D - day of month.
717
723
  /// * uppercase letters for dates, lowercase for times: M - month number , m - minutes number
@@ -734,12 +740,12 @@ var $;
734
740
  return '';
735
741
  return String(moment.year % 100);
736
742
  },
737
- 'Month': (pattern => (moment) => {
743
+ 'Month': (moment, lang) => {
738
744
  if (moment.month == null)
739
745
  return '';
740
- return pattern.format(moment.native);
741
- })(new Intl.DateTimeFormat(undefined, { month: 'long' })),
742
- 'DD Month': (pattern => (moment) => {
746
+ return $mol_time_moment.intl(lang, 'Month', { month: 'long' }).format(moment.native);
747
+ },
748
+ 'DD Month': (moment, lang) => {
743
749
  if (moment.month == null) {
744
750
  if (moment.day == null) {
745
751
  return '';
@@ -750,14 +756,14 @@ var $;
750
756
  }
751
757
  else {
752
758
  if (moment.day == null) {
753
- return $mol_time_moment.patterns['Month'](moment);
759
+ return $mol_time_moment.patterns['Month'](moment, lang);
754
760
  }
755
761
  else {
756
- return pattern.format(moment.native);
762
+ return $mol_time_moment.intl(lang, 'DD Month', { day: '2-digit', month: 'long' }).format(moment.native);
757
763
  }
758
764
  }
759
- })(new Intl.DateTimeFormat(undefined, { day: '2-digit', month: 'long' })),
760
- 'D Month': (pattern => (moment) => {
765
+ },
766
+ 'D Month': (moment, lang) => {
761
767
  if (moment.month == null) {
762
768
  if (moment.day == null) {
763
769
  return '';
@@ -771,16 +777,16 @@ var $;
771
777
  return $mol_time_moment.patterns['Month'](moment);
772
778
  }
773
779
  else {
774
- return pattern.format(moment.native);
780
+ return $mol_time_moment.intl(lang, 'D Month', { day: 'numeric', month: 'long' }).format(moment.native);
775
781
  }
776
782
  }
777
- })(new Intl.DateTimeFormat(undefined, { day: 'numeric', month: 'long' })),
778
- 'Mon': (pattern => (moment) => {
783
+ },
784
+ 'Mon': (moment, lang) => {
779
785
  if (moment.month == null)
780
786
  return '';
781
- return pattern.format(moment.native);
782
- })(new Intl.DateTimeFormat(undefined, { month: 'short' })),
783
- 'DD Mon': (pattern => (moment) => {
787
+ return $mol_time_moment.intl(lang, 'Mon', { month: 'short' }).format(moment.native);
788
+ },
789
+ 'DD Mon': (moment, lang) => {
784
790
  if (moment.month == null) {
785
791
  if (moment.day == null) {
786
792
  return '';
@@ -791,14 +797,14 @@ var $;
791
797
  }
792
798
  else {
793
799
  if (moment.day == null) {
794
- return $mol_time_moment.patterns['Mon'](moment);
800
+ return $mol_time_moment.patterns['Mon'](moment, lang);
795
801
  }
796
802
  else {
797
- return pattern.format(moment.native);
803
+ return $mol_time_moment.intl(lang, 'DD Mon', { day: '2-digit', month: 'short' }).format(moment.native);
798
804
  }
799
805
  }
800
- })(new Intl.DateTimeFormat(undefined, { day: '2-digit', month: 'short' })),
801
- 'D Mon': (pattern => (moment) => {
806
+ },
807
+ 'D Mon': (moment, lang) => {
802
808
  if (moment.month == null) {
803
809
  if (moment.day == null) {
804
810
  return '';
@@ -809,13 +815,13 @@ var $;
809
815
  }
810
816
  else {
811
817
  if (moment.day == null) {
812
- return $mol_time_moment.patterns['Mon'](moment);
818
+ return $mol_time_moment.patterns['Mon'](moment, lang);
813
819
  }
814
820
  else {
815
- return pattern.format(moment.native);
821
+ return $mol_time_moment.intl(lang, 'D Mon', { day: 'numeric', month: 'short' }).format(moment.native);
816
822
  }
817
823
  }
818
- })(new Intl.DateTimeFormat(undefined, { day: 'numeric', month: 'short' })),
824
+ },
819
825
  '-MM': (moment) => {
820
826
  if (moment.month == null)
821
827
  return '';
@@ -831,24 +837,24 @@ var $;
831
837
  return '';
832
838
  return String(moment.month + 1);
833
839
  },
834
- 'WeekDay': (pattern => (moment) => {
840
+ 'WeekDay': (moment, lang) => {
835
841
  if (moment.day == null)
836
842
  return '';
837
843
  if (moment.month == null)
838
844
  return '';
839
845
  if (moment.year == null)
840
846
  return '';
841
- return pattern.format(moment.native);
842
- })(new Intl.DateTimeFormat(undefined, { weekday: 'long' })),
843
- 'WD': (pattern => (moment) => {
847
+ return $mol_time_moment.intl(lang, 'WeekDay', { weekday: 'long' }).format(moment.native);
848
+ },
849
+ 'WD': (moment, lang) => {
844
850
  if (moment.day == null)
845
851
  return '';
846
852
  if (moment.month == null)
847
853
  return '';
848
854
  if (moment.year == null)
849
855
  return '';
850
- return pattern.format(moment.native);
851
- })(new Intl.DateTimeFormat(undefined, { weekday: 'short' })),
856
+ return $mol_time_moment.intl(lang, 'WD', { weekday: 'short' }).format(moment.native);
857
+ },
852
858
  '-DD': (moment) => {
853
859
  if (moment.day == null)
854
860
  return '';