ymd: Extract parts of various Date-Time Objects
Extract the year, month or day, or all three (in yyyymmdd
form), or the quarter, from a jul, ti, or from any object that
jul() can handle.
## S3 method for class 'jul'
## S3 method for class 'ssDate'
## S3 method for class 'ti'
(x, = 1, )
## Default S3 method:
jul, or something that
jul() can create
jul object from.
other args to be passed to the method called by the generic
ymd.default may pass these args to
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 example, if
tif = "wmonday" so
x represents a week ending on Monday, than any
offset in the range [0, 1/7] will return the Tuesday of that
offset in the range (1/7, 2/7] will return the
Wednesday of that week,
offset in the range (6/7, 1] will
return the Monday that ends the week, and so on.
ymd, and thus understand the same arguments as it does. The
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.
ymd and it's variants return numeric objects in yyyymmdd form.
ymd() with no arguments returns today's yyyymmdd.
() ## today's date and time
weekFromNow <- (() + 7) ## today() returns a daily ti
## create a monthly tis (Time Indexed Series)
aTis <- (0, = (2000, 1), = (2004, 12), freq = 12)
((aTis)) ## the yyyymmdd dates of the observations