Learn R Programming

rebus (version 0.0-5)

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)

get_months(abbreviate = FALSE, locale = NULL)

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.

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.

Examples

Run this code
get_weekdays()
get_weekdays(TRUE)
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