new_date: Date and POSIXct generators

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

These functions allow the quick creation of Date and POSIXct objects

Usage

1
2
3
new_date(x = double())

new_posixct(xx = double(), tzone = "")

Arguments

x

A double vector representing the number of days since the UNIX "epoch", 1970-01-01.

xx

A double vector representing the number of seconds since the UNIX "epoch", 1970-01-01.

tzone

A character vector representing the desired time zone. Defaults to "" for the local time zone. Possible values can be found with OlsonNames().

Value

Examples

1
2
new_date(0)
new_posixct(0, tzone = "UTC")

tjtnew/grates documentation built on Feb. 6, 2021, 6:12 p.m.