@naturalcycles/js-lib
Advanced tools
Comparing version 14.246.2 to 14.247.0
@@ -113,2 +113,17 @@ import { _assert } from '../error/assert'; | ||
} | ||
isToday() { | ||
return this.isSame(localDate.today()); | ||
} | ||
isAfterToday() { | ||
return this.isAfter(localDate.today()); | ||
} | ||
isSameOrAfterToday() { | ||
return this.isSameOrAfter(localDate.today()); | ||
} | ||
isBeforeToday() { | ||
return this.isBefore(localDate.today()); | ||
} | ||
isSameOrBeforeToday() { | ||
return this.isSameOrBefore(localDate.today()); | ||
} | ||
getAgeInYears(today) { | ||
@@ -115,0 +130,0 @@ return this.getAgeIn('year', today); |
@@ -479,2 +479,8 @@ import { _assert } from '../error/assert'; | ||
} | ||
isAfterNow() { | ||
return this.$date.valueOf() > Date.now(); | ||
} | ||
isBeforeNow() { | ||
return this.$date.valueOf() < Date.now(); | ||
} | ||
/** | ||
@@ -481,0 +487,0 @@ * Returns 1 if this > d |
@@ -58,2 +58,7 @@ import { Iterable2 } from '../iter/iterable2'; | ||
isSameOrYoungerThan(n: number, unit: LocalDateUnit, today?: LocalDateInput): boolean; | ||
isToday(): boolean; | ||
isAfterToday(): boolean; | ||
isSameOrAfterToday(): boolean; | ||
isBeforeToday(): boolean; | ||
isSameOrBeforeToday(): boolean; | ||
getAgeInYears(today?: LocalDateInput): number; | ||
@@ -60,0 +65,0 @@ getAgeInMonths(today?: LocalDateInput): number; |
@@ -116,2 +116,17 @@ "use strict"; | ||
} | ||
isToday() { | ||
return this.isSame(exports.localDate.today()); | ||
} | ||
isAfterToday() { | ||
return this.isAfter(exports.localDate.today()); | ||
} | ||
isSameOrAfterToday() { | ||
return this.isSameOrAfter(exports.localDate.today()); | ||
} | ||
isBeforeToday() { | ||
return this.isBefore(exports.localDate.today()); | ||
} | ||
isSameOrBeforeToday() { | ||
return this.isSameOrBefore(exports.localDate.today()); | ||
} | ||
getAgeInYears(today) { | ||
@@ -118,0 +133,0 @@ return this.getAgeIn('year', today); |
@@ -175,2 +175,4 @@ import type { Inclusiveness, IsoDateString, IsoDateTimeString, MonthId, NumberOfHours, NumberOfMinutes, SortDirection, UnixTimestampMillisNumber, UnixTimestampNumber } from '../types'; | ||
getAgeIn(unit: LocalTimeUnit, now?: LocalTimeInput): number; | ||
isAfterNow(): boolean; | ||
isBeforeNow(): boolean; | ||
/** | ||
@@ -177,0 +179,0 @@ * Returns 1 if this > d |
@@ -482,2 +482,8 @@ "use strict"; | ||
} | ||
isAfterNow() { | ||
return this.$date.valueOf() > Date.now(); | ||
} | ||
isBeforeNow() { | ||
return this.$date.valueOf() < Date.now(); | ||
} | ||
/** | ||
@@ -484,0 +490,0 @@ * Returns 1 if this > d |
{ | ||
"name": "@naturalcycles/js-lib", | ||
"version": "14.246.2", | ||
"version": "14.247.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "prepare": "husky", |
@@ -144,2 +144,18 @@ import { _assert } from '../error/assert' | ||
isToday(): boolean { | ||
return this.isSame(localDate.today()) | ||
} | ||
isAfterToday(): boolean { | ||
return this.isAfter(localDate.today()) | ||
} | ||
isSameOrAfterToday(): boolean { | ||
return this.isSameOrAfter(localDate.today()) | ||
} | ||
isBeforeToday(): boolean { | ||
return this.isBefore(localDate.today()) | ||
} | ||
isSameOrBeforeToday(): boolean { | ||
return this.isSameOrBefore(localDate.today()) | ||
} | ||
getAgeInYears(today?: LocalDateInput): number { | ||
@@ -146,0 +162,0 @@ return this.getAgeIn('year', today) |
@@ -541,2 +541,9 @@ import { _assert } from '../error/assert' | ||
isAfterNow(): boolean { | ||
return this.$date.valueOf() > Date.now() | ||
} | ||
isBeforeNow(): boolean { | ||
return this.$date.valueOf() < Date.now() | ||
} | ||
/** | ||
@@ -543,0 +550,0 @@ * Returns 1 if this > d |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1069393
32241