Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor10510431051043 Clk_GetDayOfWk() Anchor10510441051044Get the day of week. Anchor10510451051045

Files

...

clk.h/clk.c

...

Prototype

...

CLK_MONTH month, CLK_DAY day);
HTML Tablecode
classCode_Listing
Table Row (tr)
Table Cell (td)
rowspan5
Anchor
10523621052362
languagecpp
CLK_DAY  Clk_GetDayOfWk (CLK_YR
yr,
Anchor
10523631052363
Anchor
10510491051049
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)

...

     yr,
                         CLK_MONTH  month,
                         CLK_DAY    day);


Arguments

yr

Year value [1900 to 2135].

Anchor10524001052400month month

Month value [1 to 12], (January to December).

Anchor10524011052401day day

Day value [1 to 31].

...

Returned Values

...

Day of week [1 to 7] (Sunday to Saturday), if no errors. Anchor10524341052434

CLK_DAY_OF_WK_NONE, otherwise Anchor10524251052425

Required Configuration

...

None. Anchor10510651051065

Notes / Warnings

...

It’s only possible to get a day of week of an epoch supported by Clock: Anchor10669961066996

  • Earliest year is the NTP epoch start year, thus Year (yr) must be greater than or equal to CLK_NTP_EPOCH_YR_START.

...

  • Latest year is the Clock epoch end year, thus Year (yr) must be less than CLK_EPOCH_YR_END.

Example Usage

Anchor
10706531070653Listing - Clk_GetDayOfWk() Example Usage

...

classCode_Listing

...

rowspan8

...

Listing - Clk_GetDayOfWk() Example Usage

...

 

 
day_of_wk = Clk_GetDayOfWk(2010, 9, 18);
print(“day of week = %u”,

printf("day of week = %u", day_of_wk);
Code Block
languagecpp
titleListing - Clk_GetDayOfWk() Example Usage
linenumberstrue
CLK_DAY  day_of_wk;
Anchor
10706361070636
Anchor
10706371070637
Anchor
10706381070638
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)
Table Row (tr)

...