(self: DateTime): UtcRemoves the time aspect of a DateTime, first adjusting for the time
zone. It will return a DateTime.Utc only containing the date.
Example (Removing time components)
import { DateTime } from "effect"
// returns "2024-01-01T00:00:00Z"
DateTime.makeZonedUnsafe("2024-01-01T05:00:00Z", {
timeZone: "Pacific/Auckland",
adjustForTimeZone: true
}).pipe(
DateTime.removeTime,
DateTime.formatIso
)converting
Source effect/DateTime.ts:16801 lines
export const const removeTime: (self: DateTime) => UtcRemoves the time aspect of a DateTime, first adjusting for the time
zone. It will return a DateTime.Utc only containing the date.
Example (Removing time components)
import { DateTime } from "effect"
// returns "2024-01-01T00:00:00Z"
DateTime.makeZonedUnsafe("2024-01-01T05:00:00Z", {
timeZone: "Pacific/Auckland",
adjustForTimeZone: true
}).pipe(
DateTime.removeTime,
DateTime.formatIso
)
removeTime: (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) => Utc = import InternalInternal.const removeTime: (
self: DateTime.DateTime
) => DateTime.Utc
removeTime