@naturalcycles/js-lib 14.181.1 → 14.182.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/dist/datetime/localDate.d.ts +1 -0
- package/dist/datetime/localDate.js +5 -1
- package/dist/datetime/localTime.d.ts +1 -0
- package/dist/datetime/localTime.js +5 -1
- package/dist-esm/datetime/localDate.js +3 -0
- package/dist-esm/datetime/localTime.js +3 -0
- package/package.json +1 -1
- package/src/datetime/localDate.ts +4 -0
- package/src/datetime/localTime.ts +4 -0
|
@@ -97,6 +97,7 @@ export declare class LocalDate {
|
|
|
97
97
|
* Shortcut wrapper around `LocalDate.parse` / `LocalDate.today`
|
|
98
98
|
*/
|
|
99
99
|
export declare function localDate(d?: LocalDateInput | null): LocalDate;
|
|
100
|
+
export declare function localDateToday(): LocalDate;
|
|
100
101
|
/**
|
|
101
102
|
* Creates a LocalDate from the input, unless it's falsy - then returns undefined.
|
|
102
103
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.localDateOrUndefined = exports.localDate = exports.LocalDate = void 0;
|
|
3
|
+
exports.localDateOrUndefined = exports.localDateToday = exports.localDate = exports.LocalDate = void 0;
|
|
4
4
|
const assert_1 = require("../error/assert");
|
|
5
5
|
const localTime_1 = require("./localTime");
|
|
6
6
|
const MDAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
@@ -418,6 +418,10 @@ function localDate(d) {
|
|
|
418
418
|
return d ? LocalDate.of(d) : LocalDate.today();
|
|
419
419
|
}
|
|
420
420
|
exports.localDate = localDate;
|
|
421
|
+
function localDateToday() {
|
|
422
|
+
return LocalDate.today();
|
|
423
|
+
}
|
|
424
|
+
exports.localDateToday = localDateToday;
|
|
421
425
|
/**
|
|
422
426
|
* Creates a LocalDate from the input, unless it's falsy - then returns undefined.
|
|
423
427
|
*
|
|
@@ -126,6 +126,7 @@ export declare class LocalTime {
|
|
|
126
126
|
* Shortcut wrapper around `LocalDate.parse` / `LocalDate.today`
|
|
127
127
|
*/
|
|
128
128
|
export declare function localTime(d?: LocalTimeInput | null): LocalTime;
|
|
129
|
+
export declare function localTimeNow(): LocalTime;
|
|
129
130
|
/**
|
|
130
131
|
* Creates a LocalTime from the input, unless it's falsy - then returns undefined.
|
|
131
132
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.localTimeOrUndefined = exports.localTime = exports.LocalTime = exports.ISODayOfWeek = void 0;
|
|
3
|
+
exports.localTimeOrUndefined = exports.localTimeNow = exports.localTime = exports.LocalTime = exports.ISODayOfWeek = void 0;
|
|
4
4
|
const assert_1 = require("../error/assert");
|
|
5
5
|
const time_util_1 = require("../time/time.util");
|
|
6
6
|
const localDate_1 = require("./localDate");
|
|
@@ -495,6 +495,10 @@ function localTime(d) {
|
|
|
495
495
|
return d ? LocalTime.of(d) : LocalTime.now();
|
|
496
496
|
}
|
|
497
497
|
exports.localTime = localTime;
|
|
498
|
+
function localTimeNow() {
|
|
499
|
+
return LocalTime.now();
|
|
500
|
+
}
|
|
501
|
+
exports.localTimeNow = localTimeNow;
|
|
498
502
|
/**
|
|
499
503
|
* Creates a LocalTime from the input, unless it's falsy - then returns undefined.
|
|
500
504
|
*
|
|
@@ -413,6 +413,9 @@ export class LocalDate {
|
|
|
413
413
|
export function localDate(d) {
|
|
414
414
|
return d ? LocalDate.of(d) : LocalDate.today();
|
|
415
415
|
}
|
|
416
|
+
export function localDateToday() {
|
|
417
|
+
return LocalDate.today();
|
|
418
|
+
}
|
|
416
419
|
/**
|
|
417
420
|
* Creates a LocalDate from the input, unless it's falsy - then returns undefined.
|
|
418
421
|
*
|
|
@@ -491,6 +491,9 @@ export class LocalTime {
|
|
|
491
491
|
export function localTime(d) {
|
|
492
492
|
return d ? LocalTime.of(d) : LocalTime.now();
|
|
493
493
|
}
|
|
494
|
+
export function localTimeNow() {
|
|
495
|
+
return LocalTime.now();
|
|
496
|
+
}
|
|
494
497
|
/**
|
|
495
498
|
* Creates a LocalTime from the input, unless it's falsy - then returns undefined.
|
|
496
499
|
*
|
package/package.json
CHANGED
|
@@ -511,6 +511,10 @@ export function localDate(d?: LocalDateInput | null): LocalDate {
|
|
|
511
511
|
return d ? LocalDate.of(d) : LocalDate.today()
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
+
export function localDateToday(): LocalDate {
|
|
515
|
+
return LocalDate.today()
|
|
516
|
+
}
|
|
517
|
+
|
|
514
518
|
/**
|
|
515
519
|
* Creates a LocalDate from the input, unless it's falsy - then returns undefined.
|
|
516
520
|
*
|
|
@@ -603,6 +603,10 @@ export function localTime(d?: LocalTimeInput | null): LocalTime {
|
|
|
603
603
|
return d ? LocalTime.of(d) : LocalTime.now()
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
+
export function localTimeNow(): LocalTime {
|
|
607
|
+
return LocalTime.now()
|
|
608
|
+
}
|
|
609
|
+
|
|
606
610
|
/**
|
|
607
611
|
* Creates a LocalTime from the input, unless it's falsy - then returns undefined.
|
|
608
612
|
*
|