(options: { minimum: DateTime; maximum: DateTime }): (
self: DateTime
) => boolean
(
self: DateTime,
options: { minimum: DateTime; maximum: DateTime }
): booleanChecks whether a DateTime is between two other DateTime values (inclusive).
Example (Checking whether a DateTime is within bounds)
import { DateTime } from "effect"
const min = DateTime.makeUnsafe("2024-01-01")
const max = DateTime.makeUnsafe("2024-12-31")
const date = DateTime.makeUnsafe("2024-06-15")
console.log(DateTime.between(date, { minimum: min, maximum: max })) // trueexport const const between: {
(options: {
minimum: DateTime
maximum: DateTime
}): (self: DateTime) => boolean
(
self: DateTime,
options: {
minimum: DateTime
maximum: DateTime
}
): boolean
}
Checks whether a DateTime is between two other DateTime values (inclusive).
Example (Checking whether a DateTime is within bounds)
import { DateTime } from "effect"
const min = DateTime.makeUnsafe("2024-01-01")
const max = DateTime.makeUnsafe("2024-12-31")
const date = DateTime.makeUnsafe("2024-06-15")
console.log(DateTime.between(date, { minimum: min, maximum: max })) // true
between: {
(options: { minimum: DateTime; maximum: DateTime }options: { minimum: DateTimeminimum: 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; maximum: DateTimemaximum: 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, options: { minimum: DateTime; maximum: DateTime }options: { minimum: DateTimeminimum: 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; maximum: DateTimemaximum: 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 between: {
(options: {
minimum: DateTime.DateTime
maximum: DateTime.DateTime
}): (self: DateTime.DateTime) => boolean
(
self: DateTime.DateTime,
options: {
minimum: DateTime.DateTime
maximum: DateTime.DateTime
}
): boolean
}
between