A number of functions, such as month() and wday(), are documented to work on objects from class 'timeDate' (from package 'timeDate') but some throw warnings:
lubridate::month(timeDate::timeDate("2023-12-21"))
## [1] 12
## Warning message:
## tz(): Don't know how to compute timezone for object of class timeDate; returning "UTC".
lubridate::wday(timeDate::timeDate("2023-12-21"))
## [1] 5
## Warning message:
## tz(): Don't know how to compute timezone for object of class timeDate; returning "UTC".
Also, there is a timeSeries method for tz but it is wrong:
## wrong
lubridate:::tz.timeSeries
function (x)
{
tz(x@FinCenter) # should be just `x@FinCenter`
}
Both can be fixed by setting:
tz.timeDate <- tz.timeSeries <- function (x) {
x@FinCenter
}
and registering tz.timeDate (tz.timeSeries is already registered).
A number of functions, such as
month()
andwday()
, are documented to work on objects from class 'timeDate' (from package 'timeDate') but some throw warnings:Also, there is a
timeSeries
method fortz
but it is wrong:Both can be fixed by setting:
and registering
tz.timeDate
(tz.timeSeries
is already registered).