#' Get day of the week in Arabic
#'
#' @param x a date as a string in dd-mm-yyyy format
#'
#' @return Day of the week in Arabic
#' @export
#'
#' @examples
#' x <- "12-12-2021"
#' hijday(x)
hijday <- function(x){
query = list(date = x)
retrieved_data <- httr::GET("http://api.aladhan.com/v1/gToH", query = query)
Sys.sleep(stats::runif(1, 0, 1))
cont <- httr::content(retrieved_data, as = "text")
date1 <- jsonlite::fromJSON(cont)
date1$data$hijri$weekday$en
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.