chronal 0.0.1-0
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/esm/core/dtf.d.ts +2 -0
- package/esm/core/dtf.d.ts.map +1 -0
- package/esm/core/dtf.js +20 -0
- package/esm/lib/add.d.ts +24 -0
- package/esm/lib/add.d.ts.map +1 -0
- package/esm/lib/add.js +47 -0
- package/esm/lib/difference.d.ts +15 -0
- package/esm/lib/difference.d.ts.map +1 -0
- package/esm/lib/difference.js +47 -0
- package/esm/lib/end-of.d.ts +14 -0
- package/esm/lib/end-of.d.ts.map +1 -0
- package/esm/lib/end-of.js +53 -0
- package/esm/lib/format.d.ts +21 -0
- package/esm/lib/format.d.ts.map +1 -0
- package/esm/lib/format.js +184 -0
- package/esm/lib/is-after.d.ts +13 -0
- package/esm/lib/is-after.d.ts.map +1 -0
- package/esm/lib/is-after.js +15 -0
- package/esm/lib/is-before.d.ts +13 -0
- package/esm/lib/is-before.d.ts.map +1 -0
- package/esm/lib/is-before.js +14 -0
- package/esm/lib/months.d.ts +13 -0
- package/esm/lib/months.d.ts.map +1 -0
- package/esm/lib/months.js +25 -0
- package/esm/lib/start-of.d.ts +14 -0
- package/esm/lib/start-of.d.ts.map +1 -0
- package/esm/lib/start-of.js +50 -0
- package/esm/lib/sub.d.ts +24 -0
- package/esm/lib/sub.d.ts.map +1 -0
- package/esm/lib/sub.js +32 -0
- package/esm/lib/weekdays.d.ts +13 -0
- package/esm/lib/weekdays.d.ts.map +1 -0
- package/esm/lib/weekdays.js +25 -0
- package/esm/mod.d.ts +12 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +11 -0
- package/esm/package.json +3 -0
- package/esm/types/unit.d.ts +3 -0
- package/esm/types/unit.d.ts.map +1 -0
- package/esm/types/unit.js +1 -0
- package/package.json +26 -0
- package/script/core/dtf.d.ts +2 -0
- package/script/core/dtf.d.ts.map +1 -0
- package/script/core/dtf.js +23 -0
- package/script/lib/add.d.ts +24 -0
- package/script/lib/add.d.ts.map +1 -0
- package/script/lib/add.js +50 -0
- package/script/lib/difference.d.ts +15 -0
- package/script/lib/difference.d.ts.map +1 -0
- package/script/lib/difference.js +50 -0
- package/script/lib/end-of.d.ts +14 -0
- package/script/lib/end-of.d.ts.map +1 -0
- package/script/lib/end-of.js +56 -0
- package/script/lib/format.d.ts +21 -0
- package/script/lib/format.d.ts.map +1 -0
- package/script/lib/format.js +187 -0
- package/script/lib/is-after.d.ts +13 -0
- package/script/lib/is-after.d.ts.map +1 -0
- package/script/lib/is-after.js +18 -0
- package/script/lib/is-before.d.ts +13 -0
- package/script/lib/is-before.d.ts.map +1 -0
- package/script/lib/is-before.js +17 -0
- package/script/lib/months.d.ts +13 -0
- package/script/lib/months.d.ts.map +1 -0
- package/script/lib/months.js +28 -0
- package/script/lib/start-of.d.ts +14 -0
- package/script/lib/start-of.d.ts.map +1 -0
- package/script/lib/start-of.js +53 -0
- package/script/lib/sub.d.ts +24 -0
- package/script/lib/sub.d.ts.map +1 -0
- package/script/lib/sub.js +35 -0
- package/script/lib/weekdays.d.ts +13 -0
- package/script/lib/weekdays.d.ts.map +1 -0
- package/script/lib/weekdays.js +28 -0
- package/script/mod.d.ts +12 -0
- package/script/mod.d.ts.map +1 -0
- package/script/mod.js +27 -0
- package/script/package.json +3 -0
- package/script/types/unit.d.ts +3 -0
- package/script/types/unit.d.ts.map +1 -0
- package/script/types/unit.js +2 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the first date is after the second date.
|
|
4
|
+
*
|
|
5
|
+
* @param dateLeft - The date to compare.
|
|
6
|
+
* @param dateRight - The date to compare against.
|
|
7
|
+
* @returns True if dateLeft is after dateRight, false otherwise.
|
|
8
|
+
* @example
|
|
9
|
+
* const date1 = new Date('2024-01-20T12:00:00Z');
|
|
10
|
+
* const date2 = new Date('2024-01-15T12:00:00Z');
|
|
11
|
+
* console.log(isAfter(date1, date2)); // true
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.isAfter = isAfter;
|
|
15
|
+
function isAfter(dateLeft, dateRight) {
|
|
16
|
+
return dateLeft.getTime() > dateRight.getTime();
|
|
17
|
+
}
|
|
18
|
+
;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the first date is before the second date.
|
|
3
|
+
*
|
|
4
|
+
* @param dateLeft - The date to compare.
|
|
5
|
+
* @param dateRight - The date to compare against.
|
|
6
|
+
* @returns True if dateLeft is before dateRight, false otherwise.
|
|
7
|
+
* @example
|
|
8
|
+
* const date1 = new Date('2024-01-15T12:00:00Z');
|
|
9
|
+
* const date2 = new Date('2024-01-20T12:00:00Z');
|
|
10
|
+
* console.log(isBefore(date1, date2)); // true
|
|
11
|
+
*/
|
|
12
|
+
export declare function isBefore(dateLeft: Date, dateRight: Date): boolean;
|
|
13
|
+
//# sourceMappingURL=is-before.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-before.d.ts","sourceRoot":"","sources":["../../src/lib/is-before.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,GAAG,OAAO,CAEjE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the first date is before the second date.
|
|
4
|
+
*
|
|
5
|
+
* @param dateLeft - The date to compare.
|
|
6
|
+
* @param dateRight - The date to compare against.
|
|
7
|
+
* @returns True if dateLeft is before dateRight, false otherwise.
|
|
8
|
+
* @example
|
|
9
|
+
* const date1 = new Date('2024-01-15T12:00:00Z');
|
|
10
|
+
* const date2 = new Date('2024-01-20T12:00:00Z');
|
|
11
|
+
* console.log(isBefore(date1, date2)); // true
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.isBefore = isBefore;
|
|
15
|
+
function isBefore(dateLeft, dateRight) {
|
|
16
|
+
return dateLeft.getTime() < dateRight.getTime();
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns an array of month names for the specified locale and format.
|
|
3
|
+
*
|
|
4
|
+
* @param locale - The locale to use (default: 'en-US').
|
|
5
|
+
* @param format - The format of month names: 'long', 'short', or 'narrow' (default: 'long').
|
|
6
|
+
* @returns An array of 12 month names starting from January.
|
|
7
|
+
* @example
|
|
8
|
+
* console.log(months('en-US', 'long')); // ['January', 'February', 'March', ...]
|
|
9
|
+
* console.log(months('en-US', 'short')); // ['Jan', 'Feb', 'Mar', ...]
|
|
10
|
+
* console.log(months('pt-BR', 'long')); // ['janeiro', 'fevereiro', 'março', ...]
|
|
11
|
+
*/
|
|
12
|
+
export declare function months(locale?: string, format?: "long" | "short" | "narrow"): string[];
|
|
13
|
+
//# sourceMappingURL=months.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"months.d.ts","sourceRoot":"","sources":["../../src/lib/months.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,wBAAgB,MAAM,CACpB,MAAM,SAAU,EAChB,MAAM,GAAE,MAAM,GAAG,OAAO,GAAG,QAAiB,GAC3C,MAAM,EAAE,CAiBV"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.months = months;
|
|
4
|
+
const monthsCache = new Map();
|
|
5
|
+
/**
|
|
6
|
+
* Returns an array of month names for the specified locale and format.
|
|
7
|
+
*
|
|
8
|
+
* @param locale - The locale to use (default: 'en-US').
|
|
9
|
+
* @param format - The format of month names: 'long', 'short', or 'narrow' (default: 'long').
|
|
10
|
+
* @returns An array of 12 month names starting from January.
|
|
11
|
+
* @example
|
|
12
|
+
* console.log(months('en-US', 'long')); // ['January', 'February', 'March', ...]
|
|
13
|
+
* console.log(months('en-US', 'short')); // ['Jan', 'Feb', 'Mar', ...]
|
|
14
|
+
* console.log(months('pt-BR', 'long')); // ['janeiro', 'fevereiro', 'março', ...]
|
|
15
|
+
*/
|
|
16
|
+
function months(locale = "en-US", format = "long") {
|
|
17
|
+
const key = `${locale}|${format}`;
|
|
18
|
+
const cached = monthsCache.get(key);
|
|
19
|
+
if (cached)
|
|
20
|
+
return cached;
|
|
21
|
+
const fmt = new Intl.DateTimeFormat(locale, {
|
|
22
|
+
month: format,
|
|
23
|
+
timeZone: "UTC",
|
|
24
|
+
});
|
|
25
|
+
const result = Array.from({ length: 12 }, (_, i) => fmt.format(new Date(Date.UTC(2024, i, 1))));
|
|
26
|
+
monthsCache.set(key, result);
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Unit } from "../types/unit.js";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the start of the specified time unit for the given date.
|
|
4
|
+
*
|
|
5
|
+
* @param date - The original date.
|
|
6
|
+
* @param unit - The time unit to get the start of ('year' | 'month' | 'day' | 'hour' | 'minute' | 'second').
|
|
7
|
+
* @returns A new Date object set to the start of the specified unit.
|
|
8
|
+
* @example
|
|
9
|
+
* const date = new Date('2024-06-15T14:35:22.500Z');
|
|
10
|
+
* const startOfDay = startOf(date, 'day');
|
|
11
|
+
* console.log(startOfDay.toISOString()); // '2024-06-15T00:00:00.000Z'
|
|
12
|
+
*/
|
|
13
|
+
export declare function startOf(date: Date, unit: Unit): Date;
|
|
14
|
+
//# sourceMappingURL=start-of.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-of.d.ts","sourceRoot":"","sources":["../../src/lib/start-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;;;;;;;;GAUG;AAEH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAwCpD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startOf = startOf;
|
|
4
|
+
/**
|
|
5
|
+
* Returns the start of the specified time unit for the given date.
|
|
6
|
+
*
|
|
7
|
+
* @param date - The original date.
|
|
8
|
+
* @param unit - The time unit to get the start of ('year' | 'month' | 'day' | 'hour' | 'minute' | 'second').
|
|
9
|
+
* @returns A new Date object set to the start of the specified unit.
|
|
10
|
+
* @example
|
|
11
|
+
* const date = new Date('2024-06-15T14:35:22.500Z');
|
|
12
|
+
* const startOfDay = startOf(date, 'day');
|
|
13
|
+
* console.log(startOfDay.toISOString()); // '2024-06-15T00:00:00.000Z'
|
|
14
|
+
*/
|
|
15
|
+
function startOf(date, unit) {
|
|
16
|
+
const time = new Date(date.getTime());
|
|
17
|
+
switch (unit) {
|
|
18
|
+
case 'year': {
|
|
19
|
+
time.setUTCMonth(0, 1);
|
|
20
|
+
time.setUTCHours(0, 0, 0, 0);
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
case 'month': {
|
|
24
|
+
time.setUTCDate(1);
|
|
25
|
+
time.setUTCHours(0, 0, 0, 0);
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
case 'week': {
|
|
29
|
+
const day = time.getUTCDay();
|
|
30
|
+
const diff = (day === 0 ? -6 : 1) - day; // Adjust when day is Sunday
|
|
31
|
+
time.setUTCDate(time.getUTCDate() + diff);
|
|
32
|
+
time.setUTCHours(0, 0, 0, 0);
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
case 'day': {
|
|
36
|
+
time.setUTCHours(0, 0, 0, 0);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
case 'hour': {
|
|
40
|
+
time.setUTCMinutes(0, 0, 0);
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
case 'minute': {
|
|
44
|
+
time.setUTCSeconds(0, 0);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case 'second': {
|
|
48
|
+
time.setUTCMilliseconds(0);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return time;
|
|
53
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type SubOptions = {
|
|
2
|
+
years?: number;
|
|
3
|
+
months?: number;
|
|
4
|
+
weeks?: number;
|
|
5
|
+
days?: number;
|
|
6
|
+
hours?: number;
|
|
7
|
+
minutes?: number;
|
|
8
|
+
seconds?: number;
|
|
9
|
+
milliseconds?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Subtracts specified time units from the given date.
|
|
13
|
+
*
|
|
14
|
+
* @param date - The original date.
|
|
15
|
+
* @param opt - The time units to subtract.
|
|
16
|
+
* @returns A new Date object with the specified time units subtracted.
|
|
17
|
+
* @example
|
|
18
|
+
* const date = new Date('2024-03-31T12:00:00Z');
|
|
19
|
+
* const newDate = sub(date, { years: 1, months: 1 });
|
|
20
|
+
* console.log(newDate.toISOString()); // '2023-02-28T12:00:00.000Z'
|
|
21
|
+
*/
|
|
22
|
+
export declare function sub(date: Date, opt: SubOptions): Date;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=sub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sub.d.ts","sourceRoot":"","sources":["../../src/lib/sub.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;GAUG;AAEH,wBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAarD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sub = sub;
|
|
4
|
+
const add_js_1 = require("./add.js");
|
|
5
|
+
/**
|
|
6
|
+
* Subtracts specified time units from the given date.
|
|
7
|
+
*
|
|
8
|
+
* @param date - The original date.
|
|
9
|
+
* @param opt - The time units to subtract.
|
|
10
|
+
* @returns A new Date object with the specified time units subtracted.
|
|
11
|
+
* @example
|
|
12
|
+
* const date = new Date('2024-03-31T12:00:00Z');
|
|
13
|
+
* const newDate = sub(date, { years: 1, months: 1 });
|
|
14
|
+
* console.log(newDate.toISOString()); // '2023-02-28T12:00:00.000Z'
|
|
15
|
+
*/
|
|
16
|
+
function sub(date, opt) {
|
|
17
|
+
const out = {};
|
|
18
|
+
if (opt.years)
|
|
19
|
+
out.years = -opt.years;
|
|
20
|
+
if (opt.months)
|
|
21
|
+
out.months = -opt.months;
|
|
22
|
+
if (opt.weeks)
|
|
23
|
+
out.weeks = -opt.weeks;
|
|
24
|
+
if (opt.days)
|
|
25
|
+
out.days = -opt.days;
|
|
26
|
+
if (opt.hours)
|
|
27
|
+
out.hours = -opt.hours;
|
|
28
|
+
if (opt.minutes)
|
|
29
|
+
out.minutes = -opt.minutes;
|
|
30
|
+
if (opt.seconds)
|
|
31
|
+
out.seconds = -opt.seconds;
|
|
32
|
+
if (opt.milliseconds)
|
|
33
|
+
out.milliseconds = -opt.milliseconds;
|
|
34
|
+
return (0, add_js_1.add)(date, out);
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns an array of weekday names for the specified locale and format.
|
|
3
|
+
*
|
|
4
|
+
* @param locale - The locale to use (default: 'en-US').
|
|
5
|
+
* @param format - The format of weekday names: 'long', 'short', or 'narrow' (default: 'long').
|
|
6
|
+
* @returns An array of 7 weekday names starting from Monday.
|
|
7
|
+
* @example
|
|
8
|
+
* console.log(weekdays('en-US', 'long')); // ['Monday', 'Tuesday', 'Wednesday', ...]
|
|
9
|
+
* console.log(weekdays('en-US', 'short')); // ['Mon', 'Tue', 'Wed', ...]
|
|
10
|
+
* console.log(weekdays('pt-BR', 'long')); // ['segunda-feira', 'terça-feira', ...]
|
|
11
|
+
*/
|
|
12
|
+
export declare function weekdays(locale?: string, format?: "long" | "short" | "narrow"): string[];
|
|
13
|
+
//# sourceMappingURL=weekdays.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weekdays.d.ts","sourceRoot":"","sources":["../../src/lib/weekdays.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,wBAAgB,QAAQ,CACtB,MAAM,SAAU,EAChB,MAAM,GAAE,MAAM,GAAG,OAAO,GAAG,QAAiB,GAC3C,MAAM,EAAE,CAiBV"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.weekdays = weekdays;
|
|
4
|
+
const daysCache = new Map();
|
|
5
|
+
/**
|
|
6
|
+
* Returns an array of weekday names for the specified locale and format.
|
|
7
|
+
*
|
|
8
|
+
* @param locale - The locale to use (default: 'en-US').
|
|
9
|
+
* @param format - The format of weekday names: 'long', 'short', or 'narrow' (default: 'long').
|
|
10
|
+
* @returns An array of 7 weekday names starting from Monday.
|
|
11
|
+
* @example
|
|
12
|
+
* console.log(weekdays('en-US', 'long')); // ['Monday', 'Tuesday', 'Wednesday', ...]
|
|
13
|
+
* console.log(weekdays('en-US', 'short')); // ['Mon', 'Tue', 'Wed', ...]
|
|
14
|
+
* console.log(weekdays('pt-BR', 'long')); // ['segunda-feira', 'terça-feira', ...]
|
|
15
|
+
*/
|
|
16
|
+
function weekdays(locale = "en-US", format = "long") {
|
|
17
|
+
const key = `${locale}|${format}`;
|
|
18
|
+
const cached = daysCache.get(key);
|
|
19
|
+
if (cached)
|
|
20
|
+
return cached;
|
|
21
|
+
const fmt = new Intl.DateTimeFormat(locale, {
|
|
22
|
+
weekday: format,
|
|
23
|
+
timeZone: "UTC",
|
|
24
|
+
});
|
|
25
|
+
const result = Array.from({ length: 7 }, (_, i) => fmt.format(new Date(Date.UTC(2024, 0, i + 1))));
|
|
26
|
+
daysCache.set(key, result);
|
|
27
|
+
return result;
|
|
28
|
+
}
|
package/script/mod.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./lib/add.js";
|
|
2
|
+
export * from "./lib/sub.js";
|
|
3
|
+
export * from "./lib/months.js";
|
|
4
|
+
export * from "./lib/start-of.js";
|
|
5
|
+
export * from "./lib/end-of.js";
|
|
6
|
+
export * from "./lib/format.js";
|
|
7
|
+
export * from "./lib/weekdays.js";
|
|
8
|
+
export * from "./lib/is-after.js";
|
|
9
|
+
export * from "./lib/is-before.js";
|
|
10
|
+
export * from "./lib/difference.js";
|
|
11
|
+
export * from "./types/unit.js";
|
|
12
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
|
package/script/mod.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lib/add.js"), exports);
|
|
18
|
+
__exportStar(require("./lib/sub.js"), exports);
|
|
19
|
+
__exportStar(require("./lib/months.js"), exports);
|
|
20
|
+
__exportStar(require("./lib/start-of.js"), exports);
|
|
21
|
+
__exportStar(require("./lib/end-of.js"), exports);
|
|
22
|
+
__exportStar(require("./lib/format.js"), exports);
|
|
23
|
+
__exportStar(require("./lib/weekdays.js"), exports);
|
|
24
|
+
__exportStar(require("./lib/is-after.js"), exports);
|
|
25
|
+
__exportStar(require("./lib/is-before.js"), exports);
|
|
26
|
+
__exportStar(require("./lib/difference.js"), exports);
|
|
27
|
+
__exportStar(require("./types/unit.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../src/types/unit.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACpF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC"}
|