date_format: Proper Conversion of Date objects

View source: R/utils.R

date_formatR Documentation

Proper Conversion of Date objects

Description

Converts Date objects into a common format used for every Date object throughout the package.

Usage

date_format(date)

Arguments

date

a Date object.

Details

To limit the scope of the changes to LC_TIME and the timezone, a temporary locale modification is made using the withr package.

Value

A "%Y-%m-%d" formatted Date object with respect to a fixed locale and time zone, i.e. setting the LC_TIME component to C and timezone to UTC (the safest choice, non-geographic and Coordinated Universal Time).


injurytools documentation built on Nov. 15, 2023, 1:06 a.m.