JS.Temporal.PlainDate
- Package
- purescript-js-temporal
- Repository
- pete-murphy/purescript-js-temporal
A calendar date (year, month, day) without time or time zone. Use for date-only values (e.g. birthdays, all-day events). Uses ISO 8601 calendar by default.
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate
#ToDifferenceOptions Source
data ToDifferenceOptionsInstances
ConvertOption ToDifferenceOptions "largestUnit" TemporalUnit StringConvertOption ToDifferenceOptions "largestUnit" String StringConvertOption ToDifferenceOptions "smallestUnit" TemporalUnit StringConvertOption ToDifferenceOptions "smallestUnit" String StringConvertOption ToDifferenceOptions "roundingIncrement" Int IntConvertOption ToDifferenceOptions "roundingMode" RoundingMode StringConvertOption ToDifferenceOptions "roundingMode" String String
#ToOverflowOptions Source
data ToOverflowOptionsInstances
ConvertOption ToOverflowOptions "overflow" Overflow StringConvertOption ToOverflowOptions "overflow" String String
#ToToStringOptions Source
data ToToStringOptionsInstances
ConvertOption ToToStringOptions "calendarName" CalendarName StringConvertOption ToToStringOptions "calendarName" String String
#add Source
add :: forall provided. ConvertOptionsWithDefaults ToOverflowOptions (Record OverflowOptions) (Record provided) (Record OverflowOptions) => Record provided -> Duration -> PlainDate -> Effect PlainDateAdds a duration to a date. Supports calendar durations. Options: overflow.
#calendarId Source
calendarId :: PlainDate -> String#daysInMonth Source
daysInMonth :: PlainDate -> Int#daysInWeek Source
daysInWeek :: PlainDate -> Int#daysInYear Source
daysInYear :: PlainDate -> Int#from Source
from :: forall provided. ConvertOptionsWithDefaults ToOverflowOptions (Record OverflowOptions) (Record provided) (Record OverflowOptions) => Record provided -> String -> Effect PlainDateParses a date string (e.g. "2024-01-15"). Options: overflow.
#inLeapYear Source
inLeapYear :: PlainDate -> Boolean#monthsInYear Source
monthsInYear :: PlainDate -> Int#since Source
since :: forall provided. ConvertOptionsWithDefaults ToDifferenceOptions (Record DifferenceOptions) (Record provided) (Record DifferenceOptions) => Record provided -> PlainDate -> PlainDate -> Effect DurationDuration from the other date to this one (inverse of until).
#subtract Source
subtract :: forall provided. ConvertOptionsWithDefaults ToOverflowOptions (Record OverflowOptions) (Record provided) (Record OverflowOptions) => Record provided -> Duration -> PlainDate -> Effect PlainDateSubtracts a duration from a date. Options: overflow.
#toPlainDateTime Source
toPlainDateTime :: PlainTime -> PlainDate -> PlainDateTimeCombines a PlainTime with this date to form a PlainDateTime.
#toPlainMonthDay Source
toPlainMonthDay :: PlainDate -> PlainMonthDayDrops the year component.
#toZonedDateTime Source
toZonedDateTime :: String -> PlainDate -> Effect ZonedDateTimeConverts to ZonedDateTime at midnight in the given time zone.
#toPlainYearMonth Source
toPlainYearMonth :: PlainDate -> PlainYearMonthDrops the day component.
#toString Source
toString :: forall provided. ConvertOptionsWithDefaults ToToStringOptions (Record ToStringOptions) (Record provided) (Record ToStringOptions) => Record provided -> PlainDate -> StringSerializes to ISO 8601 date format. Options: calendarName.
#until Source
until :: forall provided. ConvertOptionsWithDefaults ToDifferenceOptions (Record DifferenceOptions) (Record provided) (Record DifferenceOptions) => Record provided -> PlainDate -> PlainDate -> Effect DurationDuration from this date until the other. Options: largestUnit, smallestUnit, roundingIncrement, roundingMode.
#with Source
with :: forall optsProvided fields rest. Union fields rest WithFields => ConvertOptionsWithDefaults ToOverflowOptions (Record OverflowOptions) (Record optsProvided) (Record OverflowOptions) => Record optsProvided -> Record fields -> PlainDate -> Effect PlainDateReturns a new PlainDate with specified fields replaced. Options: overflow.
#withCalendar Source
withCalendar :: String -> PlainDate -> Effect PlainDateReturns a new PlainDate with the given calendar (e.g. "iso8601").
Re-exports from JS.Temporal.PlainDate.Internal
- Modules
- JS.
Temporal. CalendarName - JS.
Temporal. Disambiguation - JS.
Temporal. Duration - JS.
Temporal. Duration. Internal - JS.
Temporal. Instant - JS.
Temporal. Instant. Internal - JS.
Temporal. Internal - JS.
Temporal. Now - JS.
Temporal. OffsetDisambiguation - JS.
Temporal. Overflow - JS.
Temporal. PlainDate - JS.
Temporal. PlainDate. Internal - JS.
Temporal. PlainDateTime - JS.
Temporal. PlainDateTime. Internal - JS.
Temporal. PlainMonthDay - JS.
Temporal. PlainMonthDay. Internal - JS.
Temporal. PlainTime - JS.
Temporal. PlainTime. Internal - JS.
Temporal. PlainYearMonth - JS.
Temporal. PlainYearMonth. Internal - JS.
Temporal. RoundingMode - JS.
Temporal. TemporalUnit - JS.
Temporal. ZonedDateTime - JS.
Temporal. ZonedDateTime. Internal