Date-time Conversion Functions from Numeric Representations (original) (raw)
ISOdatetime {base} | R Documentation |
---|
Description
Convenience wrappers to create date-times from numeric representations.
Usage
ISOdatetime(year, month, day, hour, min, sec, tz = "")
ISOdate(year, month, day, hour = 12, min = 0, sec = 0, tz = "GMT")
Arguments
year, month, day | numerical values to specify a day. |
---|---|
hour, min, sec | numerical values for a time within a day. Fractional seconds are allowed. |
tz | a time zone specification to be used for the conversion."" is the current time zone and "GMT" is UTC. Invalid values are most commonly treated as UTC, on some platforms with a warning. |
Details
ISOdatetime
and ISOdate
are convenience wrappers forstrptime
that differ only in their defaults and thatISOdate
sets UTC as the time zone. For dates without times it would normally be better to use the "[Date](../../base/help/Date.html)"
class.
The main arguments will be recycled using the usual recycling rules.
Because these make use of [strptime](../../base/help/strptime.html)
, only years in the range 0:9999
are accepted.
Value
An object of class "[POSIXct](../../base/help/POSIXct.html)"
.
See Also
DateTimeClasses for details of the date-time classes;[strptime](../../base/help/strptime.html)
for conversions from character strings.
[Package _base_ version 4.6.0 Index]