R/tzone.R

tzone <-
function(x) {
  UseMethod("tzone")
}

tzone.xtime <-
function(x) {
  attr(x, "tzone")
}

tzone.xts <-
function(x) {
  attr(.index(x), "tzone")
}

`tzone<-` <-
function(x,value) {
  UseMethod("tzone<-")
}

`tzone<-.xtime` <-
function(x,value) {
  attr(x, "tzone") <- structure(value, .Names="TZ")
  x
}

`tzone<-.xts` <-
function(x,value) {
  attr(.index(x), "tzone") <- structure(value, .Names="TZ")
  x
}
R-Finance/xtime documentation built on May 8, 2019, 4:51 a.m.