natural_day {humanize}R Documentation

Natural Day

Description

For date values that are tomorrow, today or yesterday compared to present day returns representing string. Otherwise, returns a string formatted according to fmt

Usage

natural_day(value, fmt = "%b %d")

Arguments

value

A date value

fmt

Optional formatting string for dates not yesterday, today, tomorrow

Value

A nicely formatted date

Examples

natural_day(Sys.Date())
natural_day(Sys.Date()-10)

[Package humanize version 0.2.0 Index]