Quick Links:

bal | bbl | bdl | bsl

Namespaces

Component bdlt_dayofweek
[Package bdlt]

Provide an enumeration of the set of days of the week. More...

Namespaces

namespace  bdlt

Detailed Description

Outline
Purpose:
Provide an enumeration of the set of days of the week.
Classes:
bdlt::DayOfWeek namespace for day-of-week enumeration (and its operations)
Description:
This component provides a namespace for the enum type bdlt::DayOfWeek::Enum, which enumerates the set of days of the week.
Enumerators:
  Long Name      Short Name   Description
  -----------    ----------   -----------
  e_SUNDAY       e_SUN        Sunday
  e_MONDAY       e_MON        Monday
  e_TUESDAY      e_TUE        Tuesday
  e_WEDNESDAY    e_WED        Wednesday
  e_THURSDAY     e_THU        Thursday
  e_FRIDAY       e_FRI        Friday
  e_SATURDAY     e_SAT        Saturday
Usage:
This section illustrates intended use of this component.
Example 1: Basic Syntax:
The following snippets of code provide a simple illustration of bdlt::DayOfWeek operation.
First, create a variable, day, of type bdlt::DayOfWeek::Enum, and initialize it to the value bdlt::DayOfWeek::e_MONDAY:
  bdlt::DayOfWeek::Enum day = bdlt::DayOfWeek::e_MONDAY;
Next, store its representation in a variable, rep, of type const char *:
  const char *rep = bdlt::DayOfWeek::toAscii(day);
  assert(0 == bsl::strcmp(rep, "MON"));
Finally, we print the value of day to stdout:
  bsl::cout << day << bsl::endl;
This statement produces the following output on stdout:
  MON