as_BC_date: function to create date BC

Description Usage Arguments Value Note Examples

View source: R/as_BC_date.R

Description

the lubridate as_date function doesn't handle dates BC correctly, hence this function creates the BC date by first projecting the date as AD, and then subtract from 0 AD.

Usage

1
as_BC_date(year, month = 1, day = 1)

Arguments

year

the year BC (either + or -)

month

the calender month, if omitted 01 is asumed

day

the day of that month, if omitted 01 is assumed

Value

date as BC date

Note

this function is for internal use

the year can be passed as negative or positive, the function assumes the user needs a BC date

Examples

1
2
3
4
## Not run: 
   BCDate <- as_BC_date(-2150, 1, 1)

## End(Not run)

RMHoek/NOAAearthquakeAnalysis documentation built on May 14, 2019, 8:58 a.m.