Expand description
Date and time builtins: Sys.Date, as.Date, as.POSIXct, format.Date, etc.
Uses the jiff crate for timezone-aware date/time operations.
R stores dates as doubles with class attributes:
- Date: days since 1970-01-01
- POSIXct: seconds since epoch, class = c(“POSIXct”, “POSIXt”)
Enums§
Constants§
- EPOCH 🔒
- The Unix epoch as a jiff Date.
Statics§
- __
BUILTIN_ 🔒REG_ BUILTIN_ AS_ DATE - __
BUILTIN_ 🔒REG_ BUILTIN_ AS_ POSIXCT - __
BUILTIN_ 🔒REG_ BUILTIN_ AS_ POSIXLT - __
BUILTIN_ 🔒REG_ BUILTIN_ DATE - __
BUILTIN_ 🔒REG_ BUILTIN_ DIFFTIME - __
BUILTIN_ 🔒REG_ BUILTIN_ FORMAT_ DATE - __
BUILTIN_ 🔒REG_ BUILTIN_ FORMAT_ POSIXCT - __
BUILTIN_ 🔒REG_ BUILTIN_ MONTHS - __
BUILTIN_ 🔒REG_ BUILTIN_ QUARTERS - __
BUILTIN_ 🔒REG_ BUILTIN_ STRFTIME - __
BUILTIN_ 🔒REG_ BUILTIN_ STRPTIME - __
BUILTIN_ 🔒REG_ BUILTIN_ SYS_ DATE - __
BUILTIN_ 🔒REG_ BUILTIN_ SYS_ TIME - __
BUILTIN_ 🔒REG_ BUILTIN_ WEEKDAYS - __
INTERP_ 🔒REG_ INTERP_ PRINT_ DATE - __
INTERP_ 🔒REG_ INTERP_ PRINT_ DIFFTIME - __
INTERP_ 🔒REG_ INTERP_ PRINT_ POSIXCT
Functions§
- builtin_
as_ 🔒date - Convert a character string or numeric value to a Date object.
- builtin_
as_ 🔒posixct - Convert a character string or numeric value to a POSIXct date-time.
- builtin_
as_ 🔒posixlt - Convert a value to a POSIXlt (broken-down time) list representation.
- builtin_
date 🔒 - Return the current date and time as a character string.
- builtin_
difftime 🔒 - Compute the time difference between two date-time values.
- builtin_
format_ 🔒date - Format a Date object as a character string.
- builtin_
format_ 🔒posixct - Format a POSIXct object as a character string.
- builtin_
months 🔒 - Extract the month name from a Date object.
- builtin_
quarters 🔒 - Extract the quarter from a Date object.
- builtin_
strftime 🔒 - Format a POSIXct date-time as a character string.
- builtin_
strptime 🔒 - Parse a character string into a POSIXct date-time using a format specification.
- builtin_
sys_ 🔒date - Get the current date.
- builtin_
sys_ 🔒time - Get the current date-time as a POSIXct value.
- builtin_
weekdays 🔒 - Extract the day-of-week name from a Date object.
- civil_
to_ 🔒zoned - Convert a civil DateTime to a Zoned datetime in the given timezone.
- date_
to_ 🔒days - Convert a jiff Date to days-since-epoch (f64).
- days_
to_ 🔒date - Convert days-since-epoch (f64) to a jiff Date.
- extract_
date_ 🔒component - Helper: extract a string component from each date in a Date vector.
- interp_
print_ 🔒date - Print a Date object to stdout.
- interp_
print_ 🔒difftime - Print a difftime object to stdout.
- interp_
print_ 🔒posixct - Print a POSIXct object to stdout.
- parse_
date_ 🔒string - Try common date formats in order.
- parse_
datetime_ 🔒string - Try common datetime formats.
- r_date 🔒
- Build an RValue with class = “Date”.
- r_
date_ 🔒vec - Build a Date vector with class attr from days values.
- r_
posixct 🔒 - Build an RValue with class = c(“POSIXct”, “POSIXt”).
- r_
posixct_ 🔒vec - Build a POSIXct vector from multiple seconds values.
- resolve_
origin 🔒 - Resolve the ‘origin’ argument for numeric→Date conversion.
- secs_
to_ 🔒timestamp - Convert seconds-since-epoch (f64) to a jiff Timestamp.
- timestamp_
to_ 🔒secs - Extract seconds-since-epoch from a Timestamp.
- translate_
format 🔒 - Map R strftime codes to jiff strftime codes. Most are identical; R’s %OS (fractional seconds) maps to %S%.f.