The
dateUtils
module provides functions for retrieving date-related data such as days, months, quarters, and eras. It also includes a function for fetching Greek holidays for a specific year.
Description: Retrieves an array of localized day names.
Parameters:
options
: An object specifying the options for retrieval.
locale
(optional, default: "el"): The locale for the day names ("el" for Greek, "en" for English).format
(optional, default: "full"): The format of the day names ("full", "short", or "min").
Description: Retrieves an array of localized month names.
Parameters:
options
: An object specifying the options for retrieval.
locale
(optional, default: "el"): The locale for the month names ("el" for Greek, "en" for English).format
(optional, default: "full"): The format of the month names ("full", "short", "min", or "alternative").
Return Type: Array of month names based on the specified format.
Description: Retrieves an array of localized quarter names.
Parameters:
options
: An object specifying the options for retrieval.
locale
(optional, default: "el"): The locale for the quarter names ("el" for Greek, "en" for English).format
(optional, default: "full"): The format of the quarter names ("full", "short", or "min").
Return Type: Array of quarter names based on the specified format.
Description: Retrieves an array of localized era names.
Parameters:
options
: An object specifying the options for retrieval.
locale
(optional, default: "el"): The locale for the era names ("el" for Greek, "en" for English).format
(optional, default: "full"): The format of the era names ("full", "short", or "min").
Return Type: Array of era names based on the specified format.
Description: Retrieves an array of Greek holidays.
Parameters:
year
: A string representing the year for which to fetch Greek holidays.
options
: An object specifying the options for retrieval.
locale
(optional, default: "el"): The locale for the Holiday names ("el" for Greek, "en" for English).
Return Type: An array of Holiday
objects where each Holiday
object includes:
date
: A string representing the date of the holiday in the formatYYYY-MM-DD
.name
: The name of the holiday in Greek or English based on the specified locale.