as_posix_ct: Date-Time Conversion

View source: R/utils.R

as_posix_ctR Documentation

Date-Time Conversion

Description

Convert calendar date and times.

Usage

as_posix_ct(dt, tm, tm_unset = "12:00", tz = "")

Arguments

dt

'character' vector. Calendar date formatted as YYYY-MM-DD.

tm

'character' vector. Time in Greenwich Mean Time (UTC) formatted as HH:MM. Vector length equal to the length of dt.

tm_unset

'character' string. Value if time is missing, noon by default.

tz

'character' string. Time zone specification to convert to.

Value

Returns an object of class 'POSIXct'.

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

Examples

as_posix_ct(
  dt = c("2024-01-01", "2024-02-15", NA),
  tm = c("14:30", NA, "11:11"),
  tz = "America/Denver"
)

inldata documentation built on Sept. 12, 2024, 9:34 a.m.