Module

JS.Temporal.PlainMonthDay

Package
purescript-js-temporal
Repository
pete-murphy/purescript-js-temporal

A month and day without year or time zone. Use for recurring dates (e.g. birthdays, annual events). Requires a year for conversion to PlainDate.

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay

#new Source

new :: Int -> Int -> Effect PlainMonthDay

Creates a PlainMonthDay from month and day.

#from Source

from :: forall provided. ConvertOptionsWithDefaults ToOverflowOptions (Record OverflowOptions) (Record provided) (Record OverflowOptions) => Record provided -> String -> Effect PlainMonthDay

Parses a month-day string (e.g. "01-15" or "--01-15"). Options: overflow.

#from_ Source

from_ :: String -> Effect PlainMonthDay

Same as from with default options.

#with Source

with :: forall optsProvided fields rest. Union fields rest WithFields => ConvertOptionsWithDefaults ToOverflowOptions (Record OverflowOptions) (Record optsProvided) (Record OverflowOptions) => Record optsProvided -> Record fields -> PlainMonthDay -> Effect PlainMonthDay

Returns a new PlainMonthDay with specified fields replaced. Options: overflow.

#with_ Source

with_ :: forall fields rest. Union fields rest WithFields => Record fields -> PlainMonthDay -> Effect PlainMonthDay

Same as with with default options.

#toPlainDate Source

toPlainDate :: { year :: Int } -> PlainMonthDay -> Effect PlainDate

Converts to PlainDate by supplying a year.

#toString Source

toString :: forall provided. ConvertOptionsWithDefaults ToToStringOptions (Record ToStringOptions) (Record provided) (Record ToStringOptions) => Record provided -> PlainMonthDay -> String

Serializes to ISO 8601 month-day format. Options: calendarName.

#toString_ Source

toString_ :: PlainMonthDay -> String

Default ISO 8601 serialization (no options). Prefer over toString {}.

Re-exports from JS.Temporal.PlainMonthDay.Internal