Skip to contents

Small helper functions.

Usage

is_eth_date(x)

is_eth_leap(x)

# S3 method for class 'ethdate'
as.Date(x, ...)

# S3 method for class 'ethdate'
as.double(x, ...)

# S3 method for class 'ethdate'
as.character(x, ...)

Arguments

x

an ethdate or numeric vector.

...

further arguments to be passed to specific methods.

Value

is_eth_leap() returns a boolean vector, as.Date() returns Date object, as.numeric() returns number of date since 1970-01-01 GC (1962-04-23 EC), and as.character() returns formatted character date.

Examples

is_eth_leap(2011)
#> [1] TRUE