rebus.datetimes (version 0.0-1)

get_weekdays: Get the days of the week

Description

Get the names of the days of the week in a given locale.

Usage

get_weekdays(abbreviate = FALSE, locale = NULL, from = Sys.Date())

get_months(abbreviate = FALSE, locale = NULL, from = Sys.Date())

Value

A string containing a regular expression of the names of the days of the week, separated by pipes. The first day of the week will be the current day.

Arguments

abbreviate

A logical value indicating whether or not to return abbreviated names (if they are available).

locale

A string denoting the name of the locale to retrieve names in, or NULL to use the current locale.

from

Date to use for the first day/month.

Examples

Run this code
get_weekdays()
get_weekdays(TRUE)
get_months()
get_months(TRUE)
if (FALSE) {
if(.Platform$OS.type == "windows")
{
  get_weekdays(locale = "French_France")
  get_weekdays(TRUE, locale = "French_France")
  get_weekdays(locale = "Arabic_Qatar")
  get_weekdays(TRUE, locale = "Arabic_Qatar")
} else
{
  get_weekdays(locale = "fr_FR.utf8")
  get_weekdays(TRUE, locale = "fr_FR.utf8")
  get_weekdays(locale = "ar_QA.utf8")
  get_weekdays(TRUE, locale = "ar_QA.utf8")
}
}

Run the code above in your browser using DataLab