logo

const enum

sys::Weekday

sys::Obj
  sys::Enum
    sys::Weekday
  1  //
  2  // Copyright (c) 2006, Brian Frank and Andy Frank
  3  // Licensed under the Academic Free License version 3.0
  4  //
  5  // History:
  6  //   19 Sep 06  Brian Frank  Creation
  7  //
  8  
  9  **
 10  ** Enum for seven days of the week.
 11  **
 12  enum Weekday
 13  {
 14    sun,
 15    mon,
 16    tue,
 17    wed,
 18    thu,
 19    fri,
 20    sat
 21  
 22    **
 23    ** Return the weekday as a localized string according to the
 24    ** specified pattern.  The pattern rules are a subset of the
 25    ** `DateTime.toLocale`:
 26    **
 27    **    WWW    Three letter abbr weekday  Tue
 28    **    WWWW   Full weekday name          Tuesday
 29    **
 30    ** If pattern is null it defaults to "WWW".  Also see `localeAbbr`
 31    ** and `localeFull`.
 32    **
 33    Str toLocale(Str pattern := null)
 34  
 35    **
 36    ** Get the abbreviated name for the current locale.
 37    ** Configured by the 'sys::<name>Abbr' localized property.
 38    **
 39    Str localeAbbr()
 40  
 41    **
 42    ** Get the full name for the current locale.
 43    ** Configured by the 'sys::<name>Full' localized property.
 44    **
 45    Str localeFull()
 46  
 47    **
 48    ** Get the first day of the week for the current locale.
 49    ** For example in the United States, 'sun' is considered
 50    ** the start of the week.  Configured by 'sys::weekdayStart'
 51    ** localized property.
 52    **
 53    static Weekday localeStartOfWeek()
 54  
 55  }