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

format.ti

Convert Time Index or Jul to Character


Description

format formats a jul or time index object for printing. as.character for a jul or ti object is essentially just an alias for format.

Usage

## S3 method for class 'ti'
format(x, ..., tz = "")
## S3 method for class 'jul'
format(x, ...)
## S3 method for class 'ti'
as.character(x, ...)
## S3 method for class 'jul'
as.character(x, ...)

Arguments

x

a jul or ti (time index) object

tz

A timezone specification to be used for the conversion if x has an intraday frequency. System-specific, but "" is the current time zone, and "GMT" is UTC.

...

other args passed on to format.POSIXlt.

Details

The as.character methods do nothing but call the corresponding format methods. x is converted to a POSIXlt object and then format.POSIXlt takes over.

Value

a character vector representing x

Note

format.POSIXlt has been modified to understand two additional format symbols in addition to those documented in link{strftime}: "%q" in the format string is replaced with the quarter number (1 thru 4) and "%N" is replaced with the first letter of the month name.

See Also

Examples

format(today() + 0:9, "%x")
as.character(jul(today()))

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.