Clk_GetDayOfYr
Get the day of year.
Files
clk.h/clk.c
Prototype
CLK_DAY Clk_GetDayOfYr (CLK_YR yr, CLK_MONTH month, CLK_DAY day);
Arguments
yr
Year value [1900 to 2135].
month
Month value [1 to 12], (January to December).
day
Day value [1 to 31].
Returned Values
Day of year [1 to 366], if no errors.
CLK_DAY_OF_WK_NONE
, otherwise
Required Configuration
None.
Notes / Warnings
It’s only possible to get a day of year of an epoch supported by Clock:
- Earliest year is the NTP epoch start year, thus Year (
yr
) must be greater than or equal toCLK_NTP_EPOCH_YR_START
. - Latest year is the Clock epoch end year, thus Year (
yr
) must be less thanCLK_EPOCH_YR_END
.
Example Usage
Listing - Clk_GetDayOfYr() Example Usage
CLK_DAY day_of_yr; day_of_yr = Clk_GetDayOfYr(2010, 9, 18); printf("day of year = %u", day_of_yr);