Learn R Programming

ethiodate (version 0.3.1)

format.ethdate: Utils

Description

Small helper functions.

Usage

# S3 method for ethdate
format(x, format = "%Y-%m-%d", lang = c("lat", "amh", "en"), ...)

is_eth_date(x)

is_eth_leap(x)

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

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

# S3 method for ethdate as.integer(x, ...)

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

Value

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

Arguments

x

an ethdate or numeric vector.

format

a format for character date.

lang

a language.

...

further arguments to be passed to specific methods.

Examples

Run this code
is_eth_leap(2011)

Run the code above in your browser using DataLab