ApasScript.

Dates

date

Gregorian date as an exact epoch-day number.

dateString

Format an epoch day as ISO 8601.

dateParts

Gregorian year, month and day fields.

isLeapYear

Whether a Gregorian year is leap.

daysInMonth

Days in a Gregorian month; invalid months return zero.

weekday

Weekday name of an epoch day.

dayOfYear

One-based day of year.

fromDayOfYear

Gregorian date from a one-based ordinal day.

isoWeek

ISO week year, week and weekday.

addMonths

Add calendar months, clamping the day to the target month.

addYears

Add calendar years, clamping the day.

dateDifference

Calendar period with years, months and days.

julianDate

Construct a Julian calendar date record.

julianEpochDay

Julian date to epoch day.

julianFromEpochDay

Epoch day to Julian calendar fields.

julianLeapYear

Julian leap-year rule.

julianDaysInMonth

Days in a Julian month.

sakaDate

Construct an Indian national calendar date record.

sakaEpochDay

Saka date to epoch day.

sakaFromEpochDay

Epoch day to Saka calendar fields.

sakaMonthName

Name of a Saka month.

sakaLeapYear

Whether the Saka year is leap.

sakaDaysInMonth

Days in a Saka month.

dateTime

Construct exact civil time; seconds may be rational.

dateTimeDays

Exact epoch days including time of day.

dateTimeFromDays

Exact epoch days to civil time.

dateTimeParts

Calendar fields, hour, minute and exact seconds.

addSeconds

Add exact civil seconds.

offset

Fixed UTC offset; minutes inherit the sign of hours.

offsetSeconds

Fixed UTC offset from signed seconds.

offsetDays

Offset as an exact fraction of a day.

toUtc

Local civil time to UTC at a fixed offset.

fromUtc

UTC civil time to local time at a fixed offset.

parseDateTime

Parse ISO text into datetime, offset and has_time fields; offset is not applied.

dateTimeString

Format civil time without an offset, retaining exact fractional seconds.

utc

Construct UTC including valid leap seconds.

utcFromDateTime

Civil time to UTC fields.

utcDateTime

UTC to civil time; leap seconds cannot be represented.

taiMinusUtc

Exact TAI minus UTC seconds with a known flag from the bundled table.

utcToTai

UTC to TAI instant with table coverage flag.

taiToUtc

TAI instant to UTC with table coverage flag.

taiToTt

TAI instant to TT.

ttToTai

TT instant to TAI.

taiToGps

TAI instant to GPS time.

gpsToTai

GPS time to TAI.

instantAddSeconds

Add exact SI seconds to a uniform time coordinate.

unixSeconds

Civil time to exact Unix seconds; leap seconds are excluded.

fromUnixSeconds

Exact Unix seconds to civil time.

nowDate

The current UTC calendar date as an epoch-day number, captured when the script run begins.

nowDateTime

The current UTC date and time as an exact civil datetime, captured when the script run begins to millisecond precision.