(that: DateTime): (self: DateTime) => boolean
(self: DateTime, that: DateTime): booleanChecks whether the first DateTime is before or equal to the second DateTime.
Example (Checking whether a DateTime is earlier or equal)
import { DateTime } from "effect"
const date1 = DateTime.makeUnsafe("2024-01-01")
const date2 = DateTime.makeUnsafe("2024-01-01")
const date3 = DateTime.makeUnsafe("2024-02-01")
console.log(DateTime.isLessThanOrEqualTo(date1, date2)) // true
console.log(DateTime.isLessThanOrEqualTo(date1, date3)) // true
console.log(DateTime.isLessThanOrEqualTo(date3, date1)) // falseexport const const isLessThanOrEqualTo: {
(that: DateTime): (self: DateTime) => boolean
(self: DateTime, that: DateTime): boolean
}
Checks whether the first DateTime is before or equal to the second DateTime.
Example (Checking whether a DateTime is earlier or equal)
import { DateTime } from "effect"
const date1 = DateTime.makeUnsafe("2024-01-01")
const date2 = DateTime.makeUnsafe("2024-01-01")
const date3 = DateTime.makeUnsafe("2024-02-01")
console.log(DateTime.isLessThanOrEqualTo(date1, date2)) // true
console.log(DateTime.isLessThanOrEqualTo(date1, date3)) // true
console.log(DateTime.isLessThanOrEqualTo(date3, date1)) // false
isLessThanOrEqualTo: {
(that: DateTimethat: type DateTime = Utc | ZonedA DateTime represents a point in time. It can optionally have a time zone
associated with it.
Companion namespace containing the public helper types used by DateTime
constructors, parts APIs, formatting, and date/time arithmetic.
DateTime): (self: DateTimeself: type DateTime = Utc | ZonedA DateTime represents a point in time. It can optionally have a time zone
associated with it.
Companion namespace containing the public helper types used by DateTime
constructors, parts APIs, formatting, and date/time arithmetic.
DateTime) => boolean
(self: DateTimeself: type DateTime = Utc | ZonedA DateTime represents a point in time. It can optionally have a time zone
associated with it.
Companion namespace containing the public helper types used by DateTime
constructors, parts APIs, formatting, and date/time arithmetic.
DateTime, that: DateTimethat: type DateTime = Utc | ZonedA DateTime represents a point in time. It can optionally have a time zone
associated with it.
Companion namespace containing the public helper types used by DateTime
constructors, parts APIs, formatting, and date/time arithmetic.
DateTime): boolean
} = import InternalInternal.const isLessThanOrEqualTo: {
(that: DateTime.DateTime): (
self: DateTime.DateTime
) => boolean
(
self: DateTime.DateTime,
that: DateTime.DateTime
): boolean
}
isLessThanOrEqualTo