@bbn/bbn 2.0.72 → 2.0.74
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/dist/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/dt/classes/dt.d.ts +1 -0
- package/dist/dt/classes/dt.js +3 -0
- package/dist/dt.js +4 -1
- package/package.json +1 -1
package/dist/dt/classes/dt.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export declare abstract class bbnDt<TValue extends bbnDtTemporal> {
|
|
|
83
83
|
get S(): string;
|
|
84
84
|
get WW(): string;
|
|
85
85
|
get W(): string;
|
|
86
|
+
get isValid(): boolean;
|
|
86
87
|
format(format?: string): string;
|
|
87
88
|
matchFormat(value: any, format: string): boolean;
|
|
88
89
|
getWeekday(n: 0 | 1 | 2 | 3 | 4 | 5 | 6, mode?: string, locale?: string): string;
|
package/dist/dt/classes/dt.js
CHANGED
package/dist/dt.js
CHANGED
|
@@ -220,7 +220,10 @@ const dt = (value, inputFormat = null, cls = 'auto') => {
|
|
|
220
220
|
const d = value;
|
|
221
221
|
return new bbnDtDateTime(d.getFullYear(), d.getMonth() + 1, d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds());
|
|
222
222
|
}
|
|
223
|
-
|
|
223
|
+
else {
|
|
224
|
+
return { isValid: false };
|
|
225
|
+
}
|
|
226
|
+
//throw new Error(_('Invalid date value: %s', value));
|
|
224
227
|
};
|
|
225
228
|
dt.locales = Object.create(null);
|
|
226
229
|
dt.parse = parse;
|