weekdays.datetimeoffset | R Documentation |
Additional datetime extractors for datetimeoffset()
objects.
## S3 method for class 'datetimeoffset'
weekdays(x, abbreviate = FALSE)
## S3 method for class 'datetimeoffset'
months(x, abbreviate = FALSE)
## S3 method for class 'datetimeoffset'
quarters(x, ...)
## S3 method for class 'datetimeoffset'
julian(x, origin = as.Date("1970-01-01"), ...)
x |
A |
abbreviate |
Logical vector for whether the names should be abbreviated |
... |
Ignored |
origin |
Length one datetime of origin |
We implement datetimeoffset()
support for the following S3 methods from base
:
weekdays()
months()
quarters()
julian()
There is also datetimeoffset()
support for the following methods from lubridate
:
isoyear()
and epiyear()
quarter()
and semester()
week()
, isoweek()
, and epiweek()
wday()
and wday<-()
qday()
and qday<-()
yday()
and yday<-()
am()
and pm()
days_in_month()
dst()
leap_year()
weekdays()
, months()
, quarters()
, julian()
return character vectors.
See base::weekdays()
for more information.
dto <- datetimeoffset_now()
print(dto)
weekdays(dto)
months(dto)
quarters(dto)
julian(dto)
if (require("lubridate")) {
cat("`isoyear(dto)`: ", isoyear(dto), "\n")
cat("`epiyear(dto)`: ", epiyear(dto), "\n")
cat("`semester(dto)`: ", semester(dto), "\n")
cat("`quarter(dto)`: ", quarter(dto), "\n")
cat("`week(dto)`: ", week(dto), "\n")
cat("`isoweek(dto)`: ", isoweek(dto), "\n")
cat("`epiweek(dto)`: ", epiweek(dto), "\n")
cat("`wday(dto)`: ", wday(dto), "\n")
cat("`qday(dto)`: ", qday(dto), "\n")
cat("`yday(dto)`: ", yday(dto), "\n")
cat("`am(dto)`: ", am(dto), "\n")
cat("`pm(dto)`: ", pm(dto), "\n")
cat("`days_in_month(dto)`: ", days_in_month(dto), "\n")
cat("`dst(dto)`: ", dst(dto), "\n")
cat("`leap_year(dto)`: ", leap_year(dto), "\n")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.