Return the day of the week for the specified year, month, and day.

Synopsis

Declared in <bdlt_prolepticdateimputil.h>

static
int
ymdToDayOfWeek(
    int year,
    int month,
    int day);

Description

Return, as an integer (with 1 = SUN, 2 = MON, ..., 7 = SAT), the day (of the week) of the date value indicated by the specified year, month, and day. The behavior is undefined unless isValidYearMonthDay(year, month, day) returns true.

Return Value

day of week in [1 .. 7] (1 = SUN .. 7 = SAT)

Parameters

Name

Description

year

calendar year

month

month of year

day

day of month

Created with MrDocs