aweek-conversions: Convert aweek objects to characters or dates

Description Usage Arguments See Also Examples

Description

Convert aweek objects to characters or dates

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'aweek'
as.Date(x, floor_day = FALSE, ...)

## S3 method for class 'aweek'
as.POSIXlt(x, tz = "", floor_day = FALSE, ...)

## S3 method for class 'aweek'
as.character(x, ...)

Arguments

x

an object of class aweek.

floor_day

when TRUE, the days will be set to the start of the week.

...

parameters passed to as.POSIXlt().

tz

passed on to as.POSIXlt()

See Also

date2week() print.aweek()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
w <- date2week(Sys.Date(), week_start = "Sunday")
w
# convert to POSIX
as.POSIXlt(w)
as.POSIXlt(w, floor_day = TRUE)
as.POSIXlt(w, floor_day = TRUE, tz = "KST")

# convert to date
as.Date(w)
as.Date(w, floor_day = TRUE)

# convert to character (strip attributes)
as.character(w)

zkamvar/aweek documentation built on Jan. 5, 2021, 4:36 a.m.