natural_day: Natural Day

Description Usage Arguments Value Examples

View source: R/time.R

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

1
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

1
2

Example output

sh: 1: timedatectl: Permission denied
Error in file(con, "r") : cannot open the connection
In addition: Warning messages:
1: In system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 126
2: In file(con, "r") : cannot open file '/etc/timezone': Permission denied
[1] "today"
[1] "Feb 20"

humanize documentation built on May 2, 2019, 6:39 a.m.