Learn R Programming

tis (version 1.39)

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 ti
format(x, ..., tz = "")
# S3 method for jul
format(x, ...)
# S3 method for ti
as.character(x, ...)
# S3 method for 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.

Value

a character vector representing x

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.

See Also

format.POSIXlt, strftime

Examples

Run this code
# NOT RUN {
format(today() + 0:9, "%x")
as.character(jul(today()))
# }

Run the code above in your browser using DataLab