<That extends DateTime>(that: That): <Self extends DateTime>(
self: Self
) => Self | That
<Self extends DateTime, That extends DateTime>(self: Self, that: That):
| Self
| ThatReturns the later of two DateTime values.
Example (Selecting the later DateTime)
import { DateTime } from "effect"
const date1 = DateTime.makeUnsafe("2024-01-01")
const date2 = DateTime.makeUnsafe("2024-02-01")
const later = DateTime.max(date1, date2)
// later equals date2 (2024-02-01)export const const max: {
<That extends DateTime>(that: That): <
Self extends DateTime
>(
self: Self
) => Self | That
<Self extends DateTime, That extends DateTime>(
self: Self,
that: That
): Self | That
}
Returns the later of two DateTime values.
Example (Selecting the later DateTime)
import { DateTime } from "effect"
const date1 = DateTime.makeUnsafe("2024-01-01")
const date2 = DateTime.makeUnsafe("2024-02-01")
const later = DateTime.max(date1, date2)
// later equals date2 (2024-02-01)
max: {
<function (type parameter) That in <That extends DateTime>(that: That): <Self extends DateTime>(self: Self) => Self | ThatThat extends 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: That extends DateTimethat: function (type parameter) That in <That extends DateTime>(that: That): <Self extends DateTime>(self: Self) => Self | ThatThat): <function (type parameter) Self in <Self extends DateTime>(self: Self): Self | ThatSelf extends 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: Self extends DateTimeself: function (type parameter) Self in <Self extends DateTime>(self: Self): Self | ThatSelf) => function (type parameter) Self in <Self extends DateTime>(self: Self): Self | ThatSelf | function (type parameter) That in <That extends DateTime>(that: That): <Self extends DateTime>(self: Self) => Self | ThatThat
<function (type parameter) Self in <Self extends DateTime, That extends DateTime>(self: Self, that: That): Self | ThatSelf extends 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, function (type parameter) That in <Self extends DateTime, That extends DateTime>(self: Self, that: That): Self | ThatThat extends 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: Self extends DateTimeself: function (type parameter) Self in <Self extends DateTime, That extends DateTime>(self: Self, that: That): Self | ThatSelf, that: That extends DateTimethat: function (type parameter) That in <Self extends DateTime, That extends DateTime>(self: Self, that: That): Self | ThatThat): function (type parameter) Self in <Self extends DateTime, That extends DateTime>(self: Self, that: That): Self | ThatSelf | function (type parameter) That in <Self extends DateTime, That extends DateTime>(self: Self, that: That): Self | ThatThat
} = import InternalInternal.const max: {
<That extends DateTime.DateTime>(that: That): <
Self extends DateTime.DateTime
>(
self: Self
) => Self | That
<
Self extends DateTime.DateTime,
That extends DateTime.DateTime
>(
self: Self,
that: That
): Self | That
}
max