@bbn/bbn 2.0.64 → 2.0.65
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/date.d.ts +2 -3
- package/dist/dt/classes/date.js +0 -1
- package/dist/dt/classes/dateTime.d.ts +2 -3
- package/dist/dt/classes/dateTime.js +0 -1
- package/dist/dt/classes/monthDay.d.ts +2 -3
- package/dist/dt/classes/monthDay.js +0 -1
- package/dist/dt/classes/time.d.ts +0 -1
- package/dist/dt/classes/time.js +0 -1
- package/dist/dt/classes/yearMonth.d.ts +2 -3
- package/dist/dt/classes/yearMonth.js +0 -1
- package/dist/dt/classes/zoned.d.ts +2 -3
- package/dist/dt/classes/zoned.js +0 -1
- package/dist/dt/functions/parse.d.ts +1 -7
- package/dist/dt/vars/types.d.ts +2 -2
- package/dist/dt.d.ts +1 -2
- package/package.json +1 -1
- package/dist/dt/classes/dt.d.ts +0 -70
- package/dist/dt/classes/dt.js +0 -450
- package/dist/dt/classes/duration.d.ts +0 -39
- package/dist/dt/classes/duration.js +0 -185
- package/dist/dt/functions/getWeekday.d.ts +0 -3
- package/dist/dt/functions/getWeekday.js +0 -58
- package/dist/dt/vars/units.d.ts +0 -11
- package/dist/dt/vars/units.js +0 -109
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
import
|
|
3
|
-
import { BbnDtKind } from '../vars/types.js';
|
|
2
|
+
import { bbnDtKind } from '../vars/types.js';
|
|
4
3
|
export default class bbnDtDate extends bbnDt<Temporal.PlainDate> {
|
|
5
4
|
#private;
|
|
6
|
-
readonly kind:
|
|
5
|
+
readonly kind: bbnDtKind;
|
|
7
6
|
constructor(y?: any, m?: number, d?: number);
|
|
8
7
|
protected compareSameKind(other: this): -1 | 0 | 1;
|
|
9
8
|
get value(): Temporal.PlainDate;
|
package/dist/dt/classes/date.js
CHANGED
|
@@ -11,7 +11,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _bbnDtDate_value;
|
|
13
13
|
import { Temporal } from 'temporal-polyfill';
|
|
14
|
-
import bbnDt from './dt.js';
|
|
15
14
|
class bbnDtDate extends bbnDt {
|
|
16
15
|
constructor(y, m, d) {
|
|
17
16
|
super();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
import {
|
|
3
|
-
import bbnDt from './dt.js';
|
|
2
|
+
import { bbnDtKind } from '../vars/types.js';
|
|
4
3
|
export default class bbnDtDateTime extends bbnDt<Temporal.PlainDateTime> {
|
|
5
4
|
#private;
|
|
6
|
-
readonly kind:
|
|
5
|
+
readonly kind: bbnDtKind;
|
|
7
6
|
constructor(y?: any, m?: number, d?: number, h?: number, i?: number, s?: number, ms?: number);
|
|
8
7
|
get value(): Temporal.PlainDateTime;
|
|
9
8
|
fdate(long?: boolean, withTime?: boolean, weekday?: boolean): string;
|
|
@@ -11,7 +11,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _bbnDtDateTime_value;
|
|
13
13
|
import { Temporal } from 'temporal-polyfill';
|
|
14
|
-
import bbnDt from './dt.js';
|
|
15
14
|
class bbnDtDateTime extends bbnDt {
|
|
16
15
|
constructor(y, m, d, h, i, s, ms) {
|
|
17
16
|
super();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
import {
|
|
3
|
-
import bbnDt from './dt.js';
|
|
2
|
+
import { bbnDtKind } from '../vars/types.js';
|
|
4
3
|
export default class bbnDtMonthDay extends bbnDt<Temporal.PlainMonthDay> {
|
|
5
4
|
#private;
|
|
6
|
-
readonly kind:
|
|
5
|
+
readonly kind: bbnDtKind;
|
|
7
6
|
constructor(m?: any, d?: number);
|
|
8
7
|
get value(): Temporal.PlainMonthDay;
|
|
9
8
|
fdate(long?: boolean, withTime?: boolean, weekday?: boolean): string;
|
|
@@ -11,7 +11,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _bbnDtMonthDay_value;
|
|
13
13
|
import { Temporal } from 'temporal-polyfill';
|
|
14
|
-
import bbnDt from './dt.js';
|
|
15
14
|
class bbnDtMonthDay extends bbnDt {
|
|
16
15
|
constructor(m, d) {
|
|
17
16
|
super();
|
package/dist/dt/classes/time.js
CHANGED
|
@@ -11,7 +11,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _bbnDtTime_value;
|
|
13
13
|
import { Temporal } from 'temporal-polyfill';
|
|
14
|
-
import bbnDt from './dt.js';
|
|
15
14
|
class bbnDtTime extends bbnDt {
|
|
16
15
|
constructor(h, i, s, ms) {
|
|
17
16
|
super();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
import {
|
|
3
|
-
import { bbnDt } from './dt.js';
|
|
2
|
+
import { bbnDtKind } from '../vars/types.js';
|
|
4
3
|
export default class bbnDtYearMonth extends bbnDt<Temporal.PlainYearMonth> {
|
|
5
4
|
#private;
|
|
6
|
-
readonly kind:
|
|
5
|
+
readonly kind: bbnDtKind;
|
|
7
6
|
constructor(y?: any, m?: number);
|
|
8
7
|
get value(): Temporal.PlainYearMonth;
|
|
9
8
|
fdate(long?: boolean, withTime?: boolean, weekday?: boolean): string;
|
|
@@ -11,7 +11,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _bbnDtYearMonth_value;
|
|
13
13
|
import { Temporal } from 'temporal-polyfill';
|
|
14
|
-
import { bbnDt } from './dt.js';
|
|
15
14
|
class bbnDtYearMonth extends bbnDt {
|
|
16
15
|
constructor(y, m) {
|
|
17
16
|
super();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
import {
|
|
3
|
-
import bbnDt from './dt.js';
|
|
2
|
+
import { bbnDtKind } from '../vars/types.js';
|
|
4
3
|
export default class bbnDtZoned extends bbnDt<Temporal.ZonedDateTime> {
|
|
5
4
|
#private;
|
|
6
|
-
readonly kind:
|
|
5
|
+
readonly kind: bbnDtKind;
|
|
7
6
|
constructor(z?: any, y?: any, m?: number, d?: number, h?: number, i?: number, s?: number, ms?: number);
|
|
8
7
|
get value(): Temporal.ZonedDateTime;
|
|
9
8
|
fdate(long?: boolean, withTime?: boolean, weekday?: boolean): string;
|
package/dist/dt/classes/zoned.js
CHANGED
|
@@ -12,7 +12,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
12
12
|
var _bbnDtZoned_value;
|
|
13
13
|
import { Temporal } from 'temporal-polyfill';
|
|
14
14
|
import fromJsDate from '../functions/fromJsDate.js';
|
|
15
|
-
import bbnDt from './dt.js';
|
|
16
15
|
class bbnDtZoned extends bbnDt {
|
|
17
16
|
constructor(z, y, m, d, h, i, s, ms) {
|
|
18
17
|
super();
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import bbnDtZoned from '../classes/zoned.js';
|
|
2
|
-
import bbnDtDateTime from '../classes/dateTime.js';
|
|
3
|
-
import bbnDtDate from '../classes/date.js';
|
|
4
|
-
import bbnDtTime from '../classes/time.js';
|
|
5
|
-
import bbnDtYearMonth from '../classes/yearMonth.js';
|
|
6
|
-
import bbnDtMonthDay from '../classes/monthDay.js';
|
|
7
1
|
export default function parse(input: string, format: string | string[], cls?: 'auto' | 'zoned' | 'dateTime' | 'date' | 'time' | 'yearMonth' | 'monthDay', locale?: {
|
|
8
2
|
monthsLong?: string[];
|
|
9
3
|
monthsShort?: string[];
|
|
10
4
|
weekdaysLong?: string[];
|
|
11
5
|
weekdaysShort?: string[];
|
|
12
|
-
}):
|
|
6
|
+
}): bbnDt<any>;
|
package/dist/dt/vars/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Temporal } from 'temporal-polyfill';
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
2
|
+
export type bbnDtKind = 'datetime' | 'date' | 'time' | 'year-month' | 'month-day' | 'zoned';
|
|
3
|
+
export type bbnDtTemporal = Temporal.PlainDateTime | Temporal.PlainDate | Temporal.PlainTime | Temporal.PlainYearMonth | Temporal.PlainMonthDay | Temporal.ZonedDateTime;
|
package/dist/dt.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import bbnDtDateTime from './dt/classes/dateTime.js';
|
|
2
1
|
import parse from './dt/functions/parse.js';
|
|
3
2
|
import guessFormat from './dt/functions/guessFormat.js';
|
|
4
3
|
declare const dt: {
|
|
5
|
-
(value: any, inputFormat?: null | String, cls?: "auto" | "zoned" | "dateTime" | "date" | "time" | "yearMonth" | "monthDay"):
|
|
4
|
+
(value: any, inputFormat?: null | String, cls?: "auto" | "zoned" | "dateTime" | "date" | "time" | "yearMonth" | "monthDay"): bbnDt<any>;
|
|
6
5
|
locales: any;
|
|
7
6
|
parse: typeof parse;
|
|
8
7
|
guessFormat: typeof guessFormat;
|
package/package.json
CHANGED
package/dist/dt/classes/dt.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { BbnDtKind, BbnDtTemporal } from '../vars/types.js';
|
|
2
|
-
import bbnDtDuration from './duration.js';
|
|
3
|
-
export declare abstract class bbnDt<TValue extends BbnDtTemporal> {
|
|
4
|
-
abstract readonly kind: BbnDtKind;
|
|
5
|
-
abstract get value(): TValue;
|
|
6
|
-
static compare(a: any, b: any, unit: string | undefined): -1 | 0 | 1;
|
|
7
|
-
static parse(input: string, format: string | string[], cls?: 'auto' | 'zoned' | 'dateTime' | 'date' | 'time' | 'yearMonth' | 'monthDay', locale?: {
|
|
8
|
-
monthsLong?: string[];
|
|
9
|
-
monthsShort?: string[];
|
|
10
|
-
weekdaysLong?: string[];
|
|
11
|
-
weekdaysShort?: string[];
|
|
12
|
-
}): bbnDt<any>;
|
|
13
|
-
parse(input: string, format: string): bbnDt<any>;
|
|
14
|
-
compare(other: any, unit?: string): -1 | 0 | 1;
|
|
15
|
-
add(amount: number | bbnDtDuration | object, unit?: string): TValue;
|
|
16
|
-
subtract(amount: number | bbnDtDuration | object, unit?: string): TValue;
|
|
17
|
-
isBefore(other: bbnDt<any>): boolean;
|
|
18
|
-
isAfter(other: bbnDt<any>): boolean;
|
|
19
|
-
isSame(other: bbnDt<any>): boolean;
|
|
20
|
-
equals(other: bbnDt<any>): boolean;
|
|
21
|
-
toJSON(): {
|
|
22
|
-
kind: BbnDtKind;
|
|
23
|
-
value: string;
|
|
24
|
-
};
|
|
25
|
-
toString(): string;
|
|
26
|
-
year(v?: any): number | TValue;
|
|
27
|
-
month(v?: any): number | TValue;
|
|
28
|
-
day(v?: any): number | TValue;
|
|
29
|
-
hour(v?: any): number | TValue;
|
|
30
|
-
minute(v?: any): number | TValue;
|
|
31
|
-
second(v?: any): number | TValue;
|
|
32
|
-
weekday(v?: any, past?: any): number | TValue;
|
|
33
|
-
date(v?: any): string | bbnDt<any>;
|
|
34
|
-
datetime(v?: any): string | bbnDt<any>;
|
|
35
|
-
time(v?: any): string | bbnDt<any>;
|
|
36
|
-
week(): number;
|
|
37
|
-
get YYYY(): string;
|
|
38
|
-
get YY(): string;
|
|
39
|
-
get MMMM(): string;
|
|
40
|
-
get MMM(): string;
|
|
41
|
-
get MM(): string;
|
|
42
|
-
get M(): string;
|
|
43
|
-
get EE(): string;
|
|
44
|
-
get DD(): string;
|
|
45
|
-
get d(): string;
|
|
46
|
-
get dddd(): string;
|
|
47
|
-
get ddd(): string;
|
|
48
|
-
get D(): string;
|
|
49
|
-
get HH(): string;
|
|
50
|
-
get H(): string;
|
|
51
|
-
get II(): string;
|
|
52
|
-
get mm(): string;
|
|
53
|
-
get I(): string;
|
|
54
|
-
get SS(): string;
|
|
55
|
-
get S(): string;
|
|
56
|
-
get WW(): string;
|
|
57
|
-
get W(): string;
|
|
58
|
-
format(format?: string): string;
|
|
59
|
-
/**
|
|
60
|
-
* Returns a NEW date that is the next (or previous if past=true)
|
|
61
|
-
* occurrence of the given weekday, starting from this.#value.
|
|
62
|
-
*
|
|
63
|
-
* @param {number|string} weekday - Weekday index (0=Sunday…6=Saturday)
|
|
64
|
-
* or a localized weekday name.
|
|
65
|
-
* @param {boolean} past - If true → return previous occurrence instead of next.
|
|
66
|
-
* @param {string} [locale] - Optional locale for weekday names.
|
|
67
|
-
*/
|
|
68
|
-
setWeekday(weekday: number | string, past?: boolean, locale?: string): TValue;
|
|
69
|
-
}
|
|
70
|
-
export default bbnDt;
|