dayOfWeekAsString

Determines the day of the week as a string from 1-7

dayOfWeekAsString(dayOfWeek [, locale]) → returns string

Argument Reference

dayOfWeek numeric
Required

Only values from 1 to 7 are valid.
Week starting with 1 for Sunday and ends with 7 for Saturday:
- 1 = Sunday
- 2 = Monday
- 3 = Tuesday
- 4 = Wednesday
- 5 = Thursday
- 6 = Friday
- 7 = Saturday
Values:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

locale string
Default: Default JVM Locale

Locale to use instead of the default JVM locale.

Compatibility

ColdFusion:

CF2018: Renamed parameter day_of_week to dayofweek. CF8: Added locale parameter. CFMX7: Changed behavior. The returned string is now in the language of the current locale.

Examples
Sample code invoking the dayOfWeekAsString function

dayOfWeekAsString(1)

Expected Result: Sunday

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub