The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
The Ethiopian calendar is widely used in Ethiopia and differs significantly from the Gregorian calendar. It has 13 months: 12 months of 30 days and a 13th month (Pagumē) of 5 or 6 days, depending on the year.
The ethiodate
package provides tools for parsing,
converting, and working with Ethiopian dates in R. This vignette
demonstrates how to parse Ethiopian dates from strings or numeric
formats and convert them into ethdate
objects.
You can parse Ethiopian dates from standard character representations
like “2015-01-01” (Ethiopian calendar). Use
eth_parse_date()
:
You can also provide a vector of dates:
eth_dates <- c("2015-01-01", "2015-02-15", "2015-13-05")
eth_parse_date(eth_dates)
#> [1] "2015-01-01" "2015-02-15" "2015-13-05"
If you are parsing dates from string, you must provide correct
formatting using format
argument and the string must have
consistent pattern. This argument accepts ISO 8601 formats, use
?strptime
for more.
Examples
x <- c("01/17/2025", "05/12/2017")
eth_parse_date(x, format = "%m/%d/%Y")
#> [1] "2025-01-17" "2017-05-12"
You can also parse date that contains month names if specify the exact format as follows:
ethate
is just a numeric vector, under the hood,
representing number of days since 1970-01-01 GC (1962-04-12 EC). The
date before the origin is represented by negative values. This makes it
to seamlessly integrate features if base R Date object. For
instance;
# The same origin
eth_parse_date("1962-04-23") |> unclass()
#> [1] 0
as.Date("1970-01-01") |> unclass()
#> [1] 0
So, you can supply number of days from a custom origin to construct
Ethiopian date object. If the origin is missing, the default is
1962-04-23 EC. See ?eth_date
for more.
ethiodate
validates every values before coercing it to
ethdate
object. For instance, 13th month has 6 days only
during leap year. If you supply such erroneous values, you will
NA's
along with warnig message.
Conversion between Ethiopian and Gregorian calendar is fully supported.
To Ethiopian
To Gregorian
As any other date objects, ethdate
supports date
operations. A unit any arithmetric operations is date.
You can format ethdate
object like any other date
objects.
Parsing Ethiopian dates is a crucial step in analyzing data collected
in the Ethiopian calendar system. The ethiodate
package
provides a consistent and robust interface for converting string
representations of Ethiopian dates into properly classed objects ready
for further analysis or conversion.
For more functionality, see ?eth_date
,
?eth_parse_date
, ?eth_make_date
, and the rest
of the package documentation.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.