date_to_datetime: Create a datetime by appending time and/or UTC timezone to...

View source: R/date_management.R

date_to_datetimeR Documentation

Create a datetime by appending time and/or UTC timezone to the given date string, if necessary

Description

If you would like to set a timezone in date parameter, it has to be UTC now. If not, this function will first convert the input to the default timezone based on hub parameter. It is using Eastern Time for hub = "US" and CET for hub = "ECDC". Then, return the converted date time in UTC timezone.

Usage

date_to_datetime(date = NULL, hub = c("US", "ECDC", "FluSight"))

Arguments

date

date in character. It could be a YYYY-MM-DD date, or a YYYY-MM-DD date format with HH:MM:SS time, or a YYYY-MM-DD date with HH:MM:SS time and UTC timezone. Default to NULL

hub

character vector, where the first element indicates the hub to set default timezone. Possible options are "US", "ECDC" and "FluSight".

Value

NULL or datetime characters with date, time in UTC timezone


reichlab/covidHubUtils documentation built on Feb. 6, 2024, 1:42 p.m.