| CFCalendarUTC | R Documentation |
This class represents a calendar based on the Coordinated Universal Time. Validity is from 1972 onwards, with dates represented using the Gregorian calendar, up to the present (so future timestamps are not allowed). Leap seconds are considered in all calculations. Also, time zone information is irrelevant and may not be given.
In general, the calendar should use a unit of time of a second. Minute, hour and day are allowed but discouraged. Month and year as time unit are not allowed as there is no practical way to maintain leap second accuracy.
CFtime::CFCalendar -> CFtime::CFCalendarProleptic -> CFCalendarUTC
CFtime::CFCalendar$add_day()CFtime::CFCalendar$is_compatible()CFtime::CFCalendar$is_equivalent()CFtime::CFCalendar$print()CFtime::CFCalendarProleptic$POSIX_compatible()CFtime::CFCalendarProleptic$date2offset()CFtime::CFCalendarProleptic$leap_year()CFtime::CFCalendarProleptic$month_days()CFtime::CFCalendarProleptic$offset2date()new()Create a new CF UTC calendar.
CFCalendarUTC$new(nm, definition)
nmThe name of the calendar. This must be "utc".
definitionThe string that defines the units and the origin, as per the CF Metadata Conventions.
valid_days()Indicate which of the supplied dates are valid.
CFCalendarUTC$valid_days(ymd)
ymddata.frame with dates parsed into their parts in columns
year, month and day. Any other columns are disregarded.
Logical vector with the same length as argument ymd has rows
with TRUE for valid days and FALSE for invalid days, or NA where
the row in argument ymd has NA values.
parse()Parsing a vector of date-time character strings into parts. This includes any leap seconds. Time zone indications are not allowed.
CFCalendarUTC$parse(d)
dcharacter. A character vector of date-times.
A data.frame with columns year, month, day, hour, minute,
second, time zone, and offset. Invalid input data will appear as NA.
Note that the time zone is always "+0000" and is included to maintain
compatibility with results from other calendars.
offsets2time()Decompose a vector of offsets, in units of the calendar, to
their timestamp values. This adds a specified amount of time to the
origin of a CFTime object.
CFCalendarUTC$offsets2time(offsets = NULL)
offsetsVector of numeric offsets to add to the origin of the calendar.
A data.frame with columns for the timestamp elements and as
many rows as there are offsets.
clone()The objects of this class are cloneable with this method.
CFCalendarUTC$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.