Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString PTime::GetDayName ( PTime::Weekdays  day,
NameType  type = FullName 
) [static]

Get the internationalised day of week day name (0=Sun etc).

Returns:
string for week day.
Parameters:
day  Code for day of week.
type  Flag for abbreviated or full name.

Definition at line 104 of file msdos.cxx.

Referenced by AsString().

{
  static const char * const weekdays[] = {
    "Sunday", "Monday", "Tuesday", "Wednesday",
    "Thursday", "Friday", "Saturday"
  };
  static const char * const abbrev_weekdays[] = {
    "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
  };
  return (type != FullName ? abbrev_weekdays : weekdays)[dayOfWeek];
}


Generated by  Doxygen 1.6.0   Back to index