A day of the week's name in a given locale.

Name = SRP_Date("DayOfWeekName", DayOfWeek, NameLength = "Full", Locale = "")

Returns

The human readable name for the given day of the week.

Parameters

ParameterDescription
DayOfWeekA day of week identifier, 1 = Monday, 7 = Sunday. (REQUIRED)
NameLengthHow the name is to be returned: options are "Full", "Abbreviated", and "Shortest". (OPTIONAL)
LocaleA locale for culture specific names. (OPTIONAL)

Remarks

The "DayOfWeekName" service retrieves the cultural specific name for a given day of the week. The DayOfWeek parameter must be an integer between 1 and 7, with 1 being Monday and 7 being Sunday. The value returned depends on two factors: NameLength and Locale. NameLength can be on of three options: "Full" returns the full name, "Abbreviated" returns the commonly used abbreviation, and "Shortest" returns the shortest possible name without being ambiguous. Locale is the locale name used to target a specific language.

Here is a sample of possible return values if the DayOfWeek is set to 4. The top row is the Locale value and the left column is the NameLength value:


en-USes-MXfr-CA
FullThursdayjuevesjeudi
AbbreviatedThujue.jeu.
ShortestThju.je

Examples

// Get the full name for Tuesday in the local culture
Name = SRP_Date("DayOfWeekName", 2)

// Get the abbreviated name for Tuesday in the local culture
Name = SRP_Date("DayOfWeekName", 2, "Abbreviated")

// Get the abbreviated name for Tuesday in Spain
Name = SRP_Date("DayOfWeekName", 2, "Abbreviated", "es-ES")

// Get the shortest name for Tuesday in France
Name = SRP_Date("DayOfWeekName", 2, "Shortest", "fr-FR")
  • No labels