@bbn/bbn 2.0.52 → 2.0.53

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.
@@ -24,6 +24,6 @@ type CommonFormats = {
24
24
  * - Time: hour / hour:minute / hour:minute:second (+ optional TZ).
25
25
  * - Datetime: only full dates (Y-M-D ± weekday) combined with time.
26
26
  */
27
- export declare function getCommonFormatsForLocale(lng: string | string[]): CommonFormats;
27
+ export declare function getCommonFormatsForLocale(lng?: string | string[]): CommonFormats;
28
28
  export default function buildLocaleFromIntl(): void;
29
29
  export {};
@@ -125,6 +125,9 @@ const partsToPattern = (parts, resolved, requestedOpts) => {
125
125
  * - Datetime: only full dates (Y-M-D ± weekday) combined with time.
126
126
  */
127
127
  export function getCommonFormatsForLocale(lng) {
128
+ if (!lng) {
129
+ lng = [bbn.env.lang, ...navigator.languages];
130
+ }
128
131
  const sample = new Date(Date.UTC(2000, 0, 2, 13, 45, 30));
129
132
  const date = [];
130
133
  const time = [];
@@ -1 +1 @@
1
- export default function guessFormat(input: string, formats?: string | string[], lng?: string): string | null;
1
+ export default function guessFormat(input: string, formats?: string | string[], lng?: string | string[]): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.52",
3
+ "version": "2.0.53",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",