@openmrs/esm-utils 6.2.1-pre.2774 → 6.2.1-pre.2777

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-utils",
3
- "version": "6.2.1-pre.2774",
3
+ "version": "6.2.1-pre.2777",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Helper utilities for OpenMRS",
6
6
  "browser": "dist/openmrs-esm-utils.js",
@@ -39,7 +39,7 @@
39
39
  "access": "public"
40
40
  },
41
41
  "devDependencies": {
42
- "@openmrs/esm-globals": "6.2.1-pre.2774",
42
+ "@openmrs/esm-globals": "6.2.1-pre.2777",
43
43
  "@types/semver": "^7.3.4",
44
44
  "dayjs": "^1.10.4",
45
45
  "rxjs": "^6.5.3"
@@ -5,6 +5,7 @@ import {
5
5
  formatDate,
6
6
  formatDatetime,
7
7
  formatTime,
8
+ registerDefaultCalendar,
8
9
  } from './date-util';
9
10
  import dayjs from 'dayjs';
10
11
  import timezoneMock from 'timezone-mock';
@@ -79,6 +80,8 @@ describe('Openmrs Dates', () => {
79
80
  });
80
81
 
81
82
  it('formats dates with respect to the active calendar', () => {
83
+ registerDefaultCalendar('am', 'ethiopic');
84
+
82
85
  timezoneMock.register('UTC');
83
86
  const testDate = new Date('2021-12-09T13:15:33');
84
87
  window.i18next.language = 'am';
@@ -151,9 +151,7 @@ const defaultOptions: FormatDateOptions = {
151
151
  class LocaleCalendars {
152
152
  #registry = new Map<string, string>();
153
153
 
154
- constructor() {
155
- this.#registry.set('am', 'ethiopic');
156
- }
154
+ constructor() {}
157
155
 
158
156
  register(locale: string, calendar: string) {
159
157
  this.#registry.set(locale, calendar);