@bodar/totallylazy
Advanced tools
Comparing version 0.438.281 to 0.439.282
@@ -10,3 +10,3 @@ import { MonthFormat, Options, WeekdayFormat } from "./core"; | ||
parse(value: string): number; | ||
get characters(): string[]; | ||
get pattern(): string; | ||
static formats: Options[]; | ||
@@ -27,2 +27,4 @@ static cache: { | ||
static formats: Options[]; | ||
parse(value: string): number; | ||
get pattern(): string; | ||
static cache: { | ||
@@ -29,0 +31,0 @@ [key: string]: Weekdays; |
@@ -19,4 +19,4 @@ "use strict"; | ||
} | ||
get characters() { | ||
return [...super.characters, '.']; | ||
get pattern() { | ||
return super.pattern + '[.]?'; | ||
} | ||
@@ -73,2 +73,8 @@ static get(locale, additionalData = []) { | ||
class Weekdays extends parsing_1.DatumLookup { | ||
parse(value) { | ||
return super.parse(cleanValue(value)); | ||
} | ||
get pattern() { | ||
return super.pattern + '[.]?'; | ||
} | ||
static get(locale, additionalData = []) { | ||
@@ -106,4 +112,4 @@ return Weekdays.cache[locale] = Weekdays.cache[locale] || Weekdays.create(locale, additionalData); | ||
if (native) | ||
return new NativeDataExtractor(locale, options, dates, 'weekday').extract(); | ||
return new FromFormatStringWeekdayExtractor(locale, options, dates).extract(); | ||
return new NativeDataExtractor(locale, options, dates, 'weekday').extract().map(cleanValue); | ||
return new FromFormatStringWeekdayExtractor(locale, options, dates).extract().map(cleanValue); | ||
})(); | ||
@@ -110,0 +116,0 @@ } |
@@ -16,2 +16,4 @@ "use strict"; | ||
return new SimpleFormat(locale, options); | ||
if (typeof options.format === "string") | ||
return new SimpleFormat(locale, options.format); | ||
return new ImprovedDateTimeFormat(locale, options); | ||
@@ -18,0 +20,0 @@ } |
@@ -220,6 +220,6 @@ "use strict"; | ||
"symbols": [ | ||
"CAD$", | ||
"$", | ||
"C$", | ||
"¢" | ||
"¢", | ||
"CAD$" | ||
] | ||
@@ -643,5 +643,5 @@ }, | ||
"symbols": [ | ||
"MRF", | ||
"ރ", | ||
"Rf", | ||
"MRF" | ||
"Rf" | ||
] | ||
@@ -973,4 +973,4 @@ }, | ||
"symbols": [ | ||
"YTL", | ||
"₺" | ||
"₺", | ||
"YTL" | ||
] | ||
@@ -977,0 +977,0 @@ }, |
{ | ||
"name": "@bodar/totallylazy", | ||
"version": "0.438.281", | ||
"version": "0.439.282", | ||
"description": "Totallylazy", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:bodar/totallylazy.js.git", |
@@ -161,3 +161,3 @@ "use strict"; | ||
} | ||
throw new Error("Unable to value: " + value); | ||
throw new Error(`Unable to parse value: ${value}`); | ||
} | ||
@@ -164,0 +164,0 @@ parseAll(value) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
440426
6461