@bemoje/date 1.1.1 → 1.1.2
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/lib/index.d.cts +90 -14
- package/lib/index.d.ts +90 -14
- package/package.json +78 -134
- package/lib/Timer.cjs +0 -21
- package/lib/Timer.d.cts +0 -6
- package/lib/Timer.d.ts +0 -6
- package/lib/Timer.js +0 -19
- package/lib/dateString.cjs +0 -12
- package/lib/dateString.d.cts +0 -6
- package/lib/dateString.d.ts +0 -6
- package/lib/dateString.js +0 -10
- package/lib/daysToMs.cjs +0 -12
- package/lib/daysToMs.d.cts +0 -6
- package/lib/daysToMs.d.ts +0 -6
- package/lib/daysToMs.js +0 -10
- package/lib/getWeek.cjs +0 -15
- package/lib/getWeek.d.cts +0 -6
- package/lib/getWeek.d.ts +0 -6
- package/lib/getWeek.js +0 -13
- package/lib/hasCooldownElapsed.cjs +0 -13
- package/lib/hasCooldownElapsed.d.cts +0 -10
- package/lib/hasCooldownElapsed.d.ts +0 -10
- package/lib/hasCooldownElapsed.js +0 -11
- package/lib/hoursToMs.cjs +0 -12
- package/lib/hoursToMs.d.cts +0 -6
- package/lib/hoursToMs.d.ts +0 -6
- package/lib/hoursToMs.js +0 -10
- package/lib/minutesToMs.cjs +0 -12
- package/lib/minutesToMs.d.cts +0 -6
- package/lib/minutesToMs.d.ts +0 -6
- package/lib/minutesToMs.js +0 -10
- package/lib/monthNameDa.cjs +0 -30
- package/lib/monthNameDa.d.cts +0 -14
- package/lib/monthNameDa.d.ts +0 -14
- package/lib/monthNameDa.js +0 -28
- package/lib/monthNameDaRelative.cjs +0 -38
- package/lib/monthNameDaRelative.d.cts +0 -13
- package/lib/monthNameDaRelative.d.ts +0 -13
- package/lib/monthNameDaRelative.js +0 -36
- package/lib/msSinceDate.cjs +0 -12
- package/lib/msSinceDate.d.cts +0 -6
- package/lib/msSinceDate.d.ts +0 -6
- package/lib/msSinceDate.js +0 -10
- package/lib/secondsToMs.cjs +0 -12
- package/lib/secondsToMs.d.cts +0 -6
- package/lib/secondsToMs.d.ts +0 -6
- package/lib/secondsToMs.js +0 -10
- package/lib/stripTime.cjs +0 -12
- package/lib/stripTime.d.cts +0 -6
- package/lib/stripTime.d.ts +0 -6
- package/lib/stripTime.js +0 -10
- package/lib/today.cjs +0 -18
- package/lib/today.d.cts +0 -6
- package/lib/today.d.ts +0 -6
- package/lib/today.js +0 -16
- package/lib/yesterday.cjs +0 -26
- package/lib/yesterday.d.cts +0 -6
- package/lib/yesterday.d.ts +0 -6
- package/lib/yesterday.js +0 -24
package/lib/daysToMs.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/daysToMs.ts
|
|
5
|
-
function daysToMs(days) {
|
|
6
|
-
return 1e3 * 60 * 60 * 24 * days;
|
|
7
|
-
}
|
|
8
|
-
__name(daysToMs, "daysToMs");
|
|
9
|
-
|
|
10
|
-
export { daysToMs };
|
package/lib/getWeek.cjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var locale = require('date-fns/locale');
|
|
4
|
-
var dateFns = require('date-fns');
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
-
function getWeek(date) {
|
|
9
|
-
return dateFns.getWeek(date, {
|
|
10
|
-
locale: locale.da
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
__name(getWeek, "getWeek");
|
|
14
|
-
|
|
15
|
-
exports.getWeek = getWeek;
|
package/lib/getWeek.d.cts
DELETED
package/lib/getWeek.d.ts
DELETED
package/lib/getWeek.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { da } from 'date-fns/locale';
|
|
2
|
-
import { getWeek as getWeek$1 } from 'date-fns';
|
|
3
|
-
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
function getWeek(date) {
|
|
7
|
-
return getWeek$1(date, {
|
|
8
|
-
locale: da
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
__name(getWeek, "getWeek");
|
|
12
|
-
|
|
13
|
-
export { getWeek };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/hasCooldownElapsed.ts
|
|
7
|
-
function hasCooldownElapsed(startDate, cooldownMs) {
|
|
8
|
-
const elapsedMs = Date.now() - startDate.getTime();
|
|
9
|
-
return elapsedMs > cooldownMs;
|
|
10
|
-
}
|
|
11
|
-
__name(hasCooldownElapsed, "hasCooldownElapsed");
|
|
12
|
-
|
|
13
|
-
exports.hasCooldownElapsed = hasCooldownElapsed;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines if a specified cooldown period has elapsed since a given date.
|
|
3
|
-
*
|
|
4
|
-
* @param startDate - The starting date to calculate elapsed time from.
|
|
5
|
-
* @param cooldownMs - The cooldown duration in milliseconds.
|
|
6
|
-
* @returns `true` if the cooldown period has elapsed, otherwise `false`.
|
|
7
|
-
*/
|
|
8
|
-
declare function hasCooldownElapsed(startDate: Date, cooldownMs: number): boolean;
|
|
9
|
-
|
|
10
|
-
export { hasCooldownElapsed };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines if a specified cooldown period has elapsed since a given date.
|
|
3
|
-
*
|
|
4
|
-
* @param startDate - The starting date to calculate elapsed time from.
|
|
5
|
-
* @param cooldownMs - The cooldown duration in milliseconds.
|
|
6
|
-
* @returns `true` if the cooldown period has elapsed, otherwise `false`.
|
|
7
|
-
*/
|
|
8
|
-
declare function hasCooldownElapsed(startDate: Date, cooldownMs: number): boolean;
|
|
9
|
-
|
|
10
|
-
export { hasCooldownElapsed };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/hasCooldownElapsed.ts
|
|
5
|
-
function hasCooldownElapsed(startDate, cooldownMs) {
|
|
6
|
-
const elapsedMs = Date.now() - startDate.getTime();
|
|
7
|
-
return elapsedMs > cooldownMs;
|
|
8
|
-
}
|
|
9
|
-
__name(hasCooldownElapsed, "hasCooldownElapsed");
|
|
10
|
-
|
|
11
|
-
export { hasCooldownElapsed };
|
package/lib/hoursToMs.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/hoursToMs.ts
|
|
7
|
-
function hoursToMs(hours) {
|
|
8
|
-
return 1e3 * 60 * 60 * hours;
|
|
9
|
-
}
|
|
10
|
-
__name(hoursToMs, "hoursToMs");
|
|
11
|
-
|
|
12
|
-
exports.hoursToMs = hoursToMs;
|
package/lib/hoursToMs.d.cts
DELETED
package/lib/hoursToMs.d.ts
DELETED
package/lib/hoursToMs.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/hoursToMs.ts
|
|
5
|
-
function hoursToMs(hours) {
|
|
6
|
-
return 1e3 * 60 * 60 * hours;
|
|
7
|
-
}
|
|
8
|
-
__name(hoursToMs, "hoursToMs");
|
|
9
|
-
|
|
10
|
-
export { hoursToMs };
|
package/lib/minutesToMs.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/minutesToMs.ts
|
|
7
|
-
function minutesToMs(minutes) {
|
|
8
|
-
return 1e3 * 60 * minutes;
|
|
9
|
-
}
|
|
10
|
-
__name(minutesToMs, "minutesToMs");
|
|
11
|
-
|
|
12
|
-
exports.minutesToMs = minutesToMs;
|
package/lib/minutesToMs.d.cts
DELETED
package/lib/minutesToMs.d.ts
DELETED
package/lib/minutesToMs.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/minutesToMs.ts
|
|
5
|
-
function minutesToMs(minutes) {
|
|
6
|
-
return 1e3 * 60 * minutes;
|
|
7
|
-
}
|
|
8
|
-
__name(minutesToMs, "minutesToMs");
|
|
9
|
-
|
|
10
|
-
export { minutesToMs };
|
package/lib/monthNameDa.cjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/monthNameDa.ts
|
|
7
|
-
function monthNameDa(month) {
|
|
8
|
-
if (month < 1 || month > 12) {
|
|
9
|
-
throw new Error(`Invalid month number. Got: ${month}`);
|
|
10
|
-
}
|
|
11
|
-
return MONTH_NAMES_DA[month];
|
|
12
|
-
}
|
|
13
|
-
__name(monthNameDa, "monthNameDa");
|
|
14
|
-
var MONTH_NAMES_DA = [
|
|
15
|
-
"",
|
|
16
|
-
"Januar",
|
|
17
|
-
"Februar",
|
|
18
|
-
"Marts",
|
|
19
|
-
"April",
|
|
20
|
-
"Maj",
|
|
21
|
-
"Juni",
|
|
22
|
-
"Juli",
|
|
23
|
-
"August",
|
|
24
|
-
"September",
|
|
25
|
-
"Oktober",
|
|
26
|
-
"November",
|
|
27
|
-
"December"
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
exports.monthNameDa = monthNameDa;
|
package/lib/monthNameDa.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the name, in Danish language, of the month corresponding to the provided month number.
|
|
3
|
-
*
|
|
4
|
-
* @param month - A month number between 1 and 12.
|
|
5
|
-
*
|
|
6
|
-
* @throws if the provided month number is not a valid month.
|
|
7
|
-
*
|
|
8
|
-
* @example ```ts
|
|
9
|
-
* monthNameDA(9) //=> 'September'
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
declare function monthNameDa(month: number): string;
|
|
13
|
-
|
|
14
|
-
export { monthNameDa };
|
package/lib/monthNameDa.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the name, in Danish language, of the month corresponding to the provided month number.
|
|
3
|
-
*
|
|
4
|
-
* @param month - A month number between 1 and 12.
|
|
5
|
-
*
|
|
6
|
-
* @throws if the provided month number is not a valid month.
|
|
7
|
-
*
|
|
8
|
-
* @example ```ts
|
|
9
|
-
* monthNameDA(9) //=> 'September'
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
declare function monthNameDa(month: number): string;
|
|
13
|
-
|
|
14
|
-
export { monthNameDa };
|
package/lib/monthNameDa.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/monthNameDa.ts
|
|
5
|
-
function monthNameDa(month) {
|
|
6
|
-
if (month < 1 || month > 12) {
|
|
7
|
-
throw new Error(`Invalid month number. Got: ${month}`);
|
|
8
|
-
}
|
|
9
|
-
return MONTH_NAMES_DA[month];
|
|
10
|
-
}
|
|
11
|
-
__name(monthNameDa, "monthNameDa");
|
|
12
|
-
var MONTH_NAMES_DA = [
|
|
13
|
-
"",
|
|
14
|
-
"Januar",
|
|
15
|
-
"Februar",
|
|
16
|
-
"Marts",
|
|
17
|
-
"April",
|
|
18
|
-
"Maj",
|
|
19
|
-
"Juni",
|
|
20
|
-
"Juli",
|
|
21
|
-
"August",
|
|
22
|
-
"September",
|
|
23
|
-
"Oktober",
|
|
24
|
-
"November",
|
|
25
|
-
"December"
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
export { monthNameDa };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var dateFns = require('date-fns');
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
|
|
8
|
-
// src/monthNameDa.ts
|
|
9
|
-
function monthNameDa(month) {
|
|
10
|
-
if (month < 1 || month > 12) {
|
|
11
|
-
throw new Error(`Invalid month number. Got: ${month}`);
|
|
12
|
-
}
|
|
13
|
-
return MONTH_NAMES_DA[month];
|
|
14
|
-
}
|
|
15
|
-
__name(monthNameDa, "monthNameDa");
|
|
16
|
-
var MONTH_NAMES_DA = [
|
|
17
|
-
"",
|
|
18
|
-
"Januar",
|
|
19
|
-
"Februar",
|
|
20
|
-
"Marts",
|
|
21
|
-
"April",
|
|
22
|
-
"Maj",
|
|
23
|
-
"Juni",
|
|
24
|
-
"Juli",
|
|
25
|
-
"August",
|
|
26
|
-
"September",
|
|
27
|
-
"Oktober",
|
|
28
|
-
"November",
|
|
29
|
-
"December"
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
// src/monthNameDaRelative.ts
|
|
33
|
-
function monthNameDaRelative(n) {
|
|
34
|
-
return monthNameDa(dateFns.addMonths(/* @__PURE__ */ new Date(), n).getUTCMonth() + 1);
|
|
35
|
-
}
|
|
36
|
-
__name(monthNameDaRelative, "monthNameDaRelative");
|
|
37
|
-
|
|
38
|
-
exports.monthNameDaRelative = monthNameDaRelative;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get the (Danish) name of the month relative to the current month.
|
|
3
|
-
*
|
|
4
|
-
* @example ```ts
|
|
5
|
-
* // assuming current month is August
|
|
6
|
-
* monthNameDaRelative(-1) //=> 'Juli'
|
|
7
|
-
* monthNameDaRelative(0) //=> 'August'
|
|
8
|
-
* monthNameDaRelative(1) //=> 'September'
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
declare function monthNameDaRelative(n: number): string;
|
|
12
|
-
|
|
13
|
-
export { monthNameDaRelative };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get the (Danish) name of the month relative to the current month.
|
|
3
|
-
*
|
|
4
|
-
* @example ```ts
|
|
5
|
-
* // assuming current month is August
|
|
6
|
-
* monthNameDaRelative(-1) //=> 'Juli'
|
|
7
|
-
* monthNameDaRelative(0) //=> 'August'
|
|
8
|
-
* monthNameDaRelative(1) //=> 'September'
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
declare function monthNameDaRelative(n: number): string;
|
|
12
|
-
|
|
13
|
-
export { monthNameDaRelative };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { addMonths } from 'date-fns';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/monthNameDa.ts
|
|
7
|
-
function monthNameDa(month) {
|
|
8
|
-
if (month < 1 || month > 12) {
|
|
9
|
-
throw new Error(`Invalid month number. Got: ${month}`);
|
|
10
|
-
}
|
|
11
|
-
return MONTH_NAMES_DA[month];
|
|
12
|
-
}
|
|
13
|
-
__name(monthNameDa, "monthNameDa");
|
|
14
|
-
var MONTH_NAMES_DA = [
|
|
15
|
-
"",
|
|
16
|
-
"Januar",
|
|
17
|
-
"Februar",
|
|
18
|
-
"Marts",
|
|
19
|
-
"April",
|
|
20
|
-
"Maj",
|
|
21
|
-
"Juni",
|
|
22
|
-
"Juli",
|
|
23
|
-
"August",
|
|
24
|
-
"September",
|
|
25
|
-
"Oktober",
|
|
26
|
-
"November",
|
|
27
|
-
"December"
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
// src/monthNameDaRelative.ts
|
|
31
|
-
function monthNameDaRelative(n) {
|
|
32
|
-
return monthNameDa(addMonths(/* @__PURE__ */ new Date(), n).getUTCMonth() + 1);
|
|
33
|
-
}
|
|
34
|
-
__name(monthNameDaRelative, "monthNameDaRelative");
|
|
35
|
-
|
|
36
|
-
export { monthNameDaRelative };
|
package/lib/msSinceDate.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/msSinceDate.ts
|
|
7
|
-
function msSinceDate(date) {
|
|
8
|
-
return Date.now() - new Date(date).getTime();
|
|
9
|
-
}
|
|
10
|
-
__name(msSinceDate, "msSinceDate");
|
|
11
|
-
|
|
12
|
-
exports.msSinceDate = msSinceDate;
|
package/lib/msSinceDate.d.cts
DELETED
package/lib/msSinceDate.d.ts
DELETED
package/lib/msSinceDate.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/msSinceDate.ts
|
|
5
|
-
function msSinceDate(date) {
|
|
6
|
-
return Date.now() - new Date(date).getTime();
|
|
7
|
-
}
|
|
8
|
-
__name(msSinceDate, "msSinceDate");
|
|
9
|
-
|
|
10
|
-
export { msSinceDate };
|
package/lib/secondsToMs.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/secondsToMs.ts
|
|
7
|
-
function secondsToMs(seconds) {
|
|
8
|
-
return 1e3 * seconds;
|
|
9
|
-
}
|
|
10
|
-
__name(secondsToMs, "secondsToMs");
|
|
11
|
-
|
|
12
|
-
exports.secondsToMs = secondsToMs;
|
package/lib/secondsToMs.d.cts
DELETED
package/lib/secondsToMs.d.ts
DELETED
package/lib/secondsToMs.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/secondsToMs.ts
|
|
5
|
-
function secondsToMs(seconds) {
|
|
6
|
-
return 1e3 * seconds;
|
|
7
|
-
}
|
|
8
|
-
__name(secondsToMs, "secondsToMs");
|
|
9
|
-
|
|
10
|
-
export { secondsToMs };
|
package/lib/stripTime.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/stripTime.ts
|
|
7
|
-
function stripTime(date) {
|
|
8
|
-
return new Date(date.toISOString().slice(0, 10));
|
|
9
|
-
}
|
|
10
|
-
__name(stripTime, "stripTime");
|
|
11
|
-
|
|
12
|
-
exports.stripTime = stripTime;
|
package/lib/stripTime.d.cts
DELETED
package/lib/stripTime.d.ts
DELETED
package/lib/stripTime.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/stripTime.ts
|
|
5
|
-
function stripTime(date) {
|
|
6
|
-
return new Date(date.toISOString().slice(0, 10));
|
|
7
|
-
}
|
|
8
|
-
__name(stripTime, "stripTime");
|
|
9
|
-
|
|
10
|
-
export { stripTime };
|
package/lib/today.cjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/stripTime.ts
|
|
7
|
-
function stripTime(date) {
|
|
8
|
-
return new Date(date.toISOString().slice(0, 10));
|
|
9
|
-
}
|
|
10
|
-
__name(stripTime, "stripTime");
|
|
11
|
-
|
|
12
|
-
// src/today.ts
|
|
13
|
-
function today() {
|
|
14
|
-
return stripTime(new Date(Date.now()));
|
|
15
|
-
}
|
|
16
|
-
__name(today, "today");
|
|
17
|
-
|
|
18
|
-
exports.today = today;
|
package/lib/today.d.cts
DELETED
package/lib/today.d.ts
DELETED
package/lib/today.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/stripTime.ts
|
|
5
|
-
function stripTime(date) {
|
|
6
|
-
return new Date(date.toISOString().slice(0, 10));
|
|
7
|
-
}
|
|
8
|
-
__name(stripTime, "stripTime");
|
|
9
|
-
|
|
10
|
-
// src/today.ts
|
|
11
|
-
function today() {
|
|
12
|
-
return stripTime(new Date(Date.now()));
|
|
13
|
-
}
|
|
14
|
-
__name(today, "today");
|
|
15
|
-
|
|
16
|
-
export { today };
|
package/lib/yesterday.cjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var dateFns = require('date-fns');
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
|
|
8
|
-
// src/stripTime.ts
|
|
9
|
-
function stripTime(date) {
|
|
10
|
-
return new Date(date.toISOString().slice(0, 10));
|
|
11
|
-
}
|
|
12
|
-
__name(stripTime, "stripTime");
|
|
13
|
-
|
|
14
|
-
// src/today.ts
|
|
15
|
-
function today() {
|
|
16
|
-
return stripTime(new Date(Date.now()));
|
|
17
|
-
}
|
|
18
|
-
__name(today, "today");
|
|
19
|
-
|
|
20
|
-
// src/yesterday.ts
|
|
21
|
-
function yesterday() {
|
|
22
|
-
return stripTime(dateFns.subDays(today(), 1));
|
|
23
|
-
}
|
|
24
|
-
__name(yesterday, "yesterday");
|
|
25
|
-
|
|
26
|
-
exports.yesterday = yesterday;
|
package/lib/yesterday.d.cts
DELETED
package/lib/yesterday.d.ts
DELETED
package/lib/yesterday.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { subDays } from 'date-fns';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
// src/stripTime.ts
|
|
7
|
-
function stripTime(date) {
|
|
8
|
-
return new Date(date.toISOString().slice(0, 10));
|
|
9
|
-
}
|
|
10
|
-
__name(stripTime, "stripTime");
|
|
11
|
-
|
|
12
|
-
// src/today.ts
|
|
13
|
-
function today() {
|
|
14
|
-
return stripTime(new Date(Date.now()));
|
|
15
|
-
}
|
|
16
|
-
__name(today, "today");
|
|
17
|
-
|
|
18
|
-
// src/yesterday.ts
|
|
19
|
-
function yesterday() {
|
|
20
|
-
return stripTime(subDays(today(), 1));
|
|
21
|
-
}
|
|
22
|
-
__name(yesterday, "yesterday");
|
|
23
|
-
|
|
24
|
-
export { yesterday };
|