dectime2Date: Date Conversion

View source: R/smwrBase_dectime2Date.R

dectime2DateR Documentation

Date Conversion

Description

Convert time data expressed as year and fractional part of year to class "Date."

Usage

dectime2Date(x, Date.noon = TRUE)

Arguments

x

the decimal date to convert.

Date.noon

correct from noon correction for dectime.

Details

Added from smwrBase.

Value

A vector of class "Date" corresponding to each value in x.

Note

A small value, representing about 1 minute, is added to each value in x to prevent truncation errors in the conversion. This can cause some errors if the data were converted from date and time data.

See Also

dectime, as.Date

Examples


dectime("02/07/2013", date.format="%m/%d/%Y")
# Convert back the printed result:
dectime2Date(2013.103)

leppott/baytrends documentation built on Nov. 2, 2024, 6:42 p.m.