Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ssDate

ssDate Objects


Description

The function ssDate is used to create ssDate (spreadsheet date) objects, which are useful for reading and writing dates in spreadsheet form, i.e., as the number of days since December 30, 1899.

as.ssDate and is.ssDate coerce an object to a ssDate and test whether an object is a ssDate.

Usage

ssDate(x, ...)
as.ssDate(x)
is.ssDate(x)

Arguments

x

object to be tested (is.ssDate) or converted into a ssDate object.

...

other args to be passed to jul function.

Details

an ssDate is essentially a rebased Julian date that represents a date as the number of days since December 30, 1899. The constructor function ssDate subtracts jul(18991230) from jul(x, ...) and coerces the result to class ssDate. Pretty much all of the stuff you can do with jul objects can also be done with ssDate objects.

Value

is.ssDate returns TRUE or FALSE.

as.ssDate coerces its argument to have class ssDate, without making any attempt to discern whether or not this is a sensible thing to do.

ssDate constructs a ssDate object like x.

ssDate with no arguments returns the ssDate for the current day.

See Also

Examples

dec31 <- ssDate(20041231)
jan30 <- ssDate("2005-1-30")
jan30 - dec31              ## 30
feb28 <- jan30 + 29
ssDate()                      ## current date

tis

Time Indexes and Time Indexed Series

v1.38
Unlimited
Authors
Jeff Hallman <jeffhallman@gmail.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.