JS.Temporal.PlainYearMonth
- Package
- purescript-js-temporal
- Repository
- pete-murphy/purescript-js-temporal
A year and month without day or time zone. Use for month-level values (e.g. "January 2024"). Requires a reference day for some operations.
#from Source
from :: forall provided. ConvertOptionsWithDefaults ToOverflowOptions (Record OverflowOptions) (Record provided) (Record OverflowOptions) => Record provided -> String -> Effect PlainYearMonthParses a year-month string (e.g. "2024-01"). Options: overflow.
#year Source
year :: PlainYearMonth -> Int#month Source
month :: PlainYearMonth -> Int#monthCode Source
monthCode :: PlainYearMonth -> String#daysInMonth Source
daysInMonth :: PlainYearMonth -> Int#daysInYear Source
daysInYear :: PlainYearMonth -> Int#monthsInYear Source
monthsInYear :: PlainYearMonth -> Int#inLeapYear Source
inLeapYear :: PlainYearMonth -> Boolean#calendarId Source
calendarId :: PlainYearMonth -> String#add Source
add :: forall provided. ConvertOptionsWithDefaults ToOverflowOptions (Record OverflowOptions) (Record provided) (Record OverflowOptions) => Record provided -> Duration -> PlainYearMonth -> Effect PlainYearMonthAdds a duration. Options: overflow.
#add_ Source
add_ :: Duration -> PlainYearMonth -> Effect PlainYearMonthSame as add with default options.
#subtract Source
subtract :: forall provided. ConvertOptionsWithDefaults ToOverflowOptions (Record OverflowOptions) (Record provided) (Record OverflowOptions) => Record provided -> Duration -> PlainYearMonth -> Effect PlainYearMonthSubtracts a duration. Options: overflow.
#subtract_ Source
subtract_ :: Duration -> PlainYearMonth -> Effect PlainYearMonthSame as subtract 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 -> PlainYearMonth -> Effect PlainYearMonthReturns a new PlainYearMonth with specified fields replaced. Options: overflow.
#with_ Source
with_ :: forall fields rest. Union fields rest WithFields => Record fields -> PlainYearMonth -> Effect PlainYearMonthSame as with with default options.
#toPlainDate Source
toPlainDate :: { day :: Int } -> PlainYearMonth -> Effect PlainDateConverts to PlainDate by supplying a day.
#until Source
until :: forall provided. ConvertOptionsWithDefaults ToDifferenceOptions (Record DifferenceOptions) (Record provided) (Record DifferenceOptions) => Record provided -> PlainYearMonth -> PlainYearMonth -> Effect DurationDuration from this year-month until the other.
#until_ Source
until_ :: PlainYearMonth -> PlainYearMonth -> Effect DurationSame as until with default options.
#since Source
since :: forall provided. ConvertOptionsWithDefaults ToDifferenceOptions (Record DifferenceOptions) (Record provided) (Record DifferenceOptions) => Record provided -> PlainYearMonth -> PlainYearMonth -> Effect DurationDuration from the other year-month to this one.
#since_ Source
since_ :: PlainYearMonth -> PlainYearMonth -> Effect DurationSame as since with default options.
#toString Source
toString :: forall provided. ConvertOptionsWithDefaults ToToStringOptions (Record ToStringOptions) (Record provided) (Record ToStringOptions) => Record provided -> PlainYearMonth -> StringSerializes to ISO 8601 year-month format. Options: calendarName.
#toString_ Source
toString_ :: PlainYearMonth -> StringDefault ISO 8601 serialization (no options). Prefer over toString {}.
#ToOverflowOptions Source
data ToOverflowOptionsInstances
ConvertOption ToOverflowOptions "overflow" Overflow StringConvertOption ToOverflowOptions "overflow" String String
#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
#ToToStringOptions Source
data ToToStringOptionsInstances
ConvertOption ToToStringOptions "calendarName" CalendarName StringConvertOption ToToStringOptions "calendarName" String String
Re-exports from JS.Temporal.PlainYearMonth.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