
jul()
can handle.ymd(x, ...)
## S3 method for class 'jul':
ymd(x, \dots)
## S3 method for class 'ssDate':
ymd(x, \dots)
## S3 method for class 'ti':
ymd(x, offset = 1, \dots)
## S3 method for class 'default':
ymd(x, \dots)
year(x, ...)
quarter(x, ...)
month(x, ...)
day(x, ...)
ti
or jul
, or something that jul()
can create
a jul
object from.year
, quarter
, month
, day
and
ymd.default
may pass these args to as.Date
.ti
x
, a number in the range [0,1] telling where in the
period represented by x
to find the day. 0 returns the first
day of the period, while the default value 1 returns the last day of
the period. For examplymd
and it's variants return numeric objects in yyyymmdd form. year
, quarter
, month
and day
return
numeric objects.
ymd()
with no arguments returns today's yyyymmdd.
year
, quarter
, month
and day
call
ymd
, and thus understand the same arguments as it does. The
default implementation ymd.default
passes it's arguments to a
call to the function jul
, so all of these functions work the
same way that function does.jul
, ti
, as.Date
ymd() ## today's date and time
weekFromNow <- ymd(today() + 7) ## today() returns a daily ti
year(jul(today()))
month(Sys.time())
## create a monthly tis (Time Indexed Series)
aTis <- tis(0, start = c(2000, 1), end = c(2004, 12), freq = 12)
ymd(ti(aTis)) ## the yyyymmdd dates of the observations
Run the code above in your browser using DataLab