christmaswrap is an API wrapper written in R for the Christmas Countdown API.
if (!require("remotes")) {
install.packages("remotes")
}
remotes::install_github("Sean-C-Casey/christmaswrap")
> library(christmaswrap)
>
> time_left(timezone = "PST")
$months
[1] 10
$weeks
[1] 44
$sleeps
[1] 313
$days
[1] 312
$hours
[1] 7510
$minutes
[1] 450651
$seconds
[1] 27039087
> total_time_left(timezone = "PST")
$days
[1] 312
$hours
[1] 22
$minutes
[1] 49
$seconds
[1] 59
> period_left("weeks", timezone = "PST")
[1] 44
> weekday(return_index = FALSE)
[1] "Sunday"
> joke()
$question
[1] "Why has Debenhams been forced to cancel its Christmas nativity play?"
$answer
[1] "No prophet!"
> all_jokes()
[[1]]
[[1]]$question
[1] "What does Santa suffer from if he gets stuck in a chimney?"
[[1]]$answer
[1] "Claus-trophobia!"
...
[[110]]
[[110]]$question
[1] "Why has Boris Johnson bought mistletoe this year?"
[[110]]$answer
[1] "Because he’s tired of being in the single market!"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.