islamic_date {calcal} | R Documentation |
Islamic calendar dates
Description
The Islamic (or Hijri) calendar is a lunar calendar comprising 12 lunar months in a year of 354 or 355 days. It is widely used in for Islamic holidays, and in countries where the predominant religion is Islam.
Usage
islamic_date(year = integer(), month = integer(), day = integer())
as_islamic(date)
oislamic_date(year = integer(), month = integer(), day = integer())
as_oislamic(date)
saudi_date(year = integer(), month = integer(), day = integer())
as_saudi(date)
Arguments
year |
A numeric vector of years |
month |
A numeric vector of months |
day |
A numeric vector of days |
date |
Vector of dates on some calendar |
Details
Three variations are implemented here. The standard Islamic calendar
is available using as_islamic
and islamic_date
. The Saudi Islamic calendar
uses as_saudi
and saudi_date
, while the traditional observational
Islamic calendar is available using as_oislamic
and oislamic_date
.
Value
An islamic vector object
See Also
Examples
islamic_date(2025, 5, 1:30)
as_islamic("2016-01-01")
as_islamic(Sys.Date())
tibble::tibble(
x = seq(as.Date("2025-01-01"), as.Date("2025-12-31"), by = "day"),
y = as_islamic(x)
)
islamic_date(2025, 5, 1:10) |> day_of_week()
islamic_date(2025, 4, 19:30)
[Package calcal version 1.0.0 Index]