|
HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
|
Time related utilities. More...
#include <time.h>#include "sarmfsw.h"

Data Structures | |
| struct | DateTime |
| Basic Date & Time struct. More... | |
Enumerations | |
| enum | eMonths { January = 1U , February , March , April , May , June , July , August , September , October , November , December , Months_Max } |
| Months enumeration. More... | |
| enum | eWeekdays { Sunday = 0U , Monday , Tuesday , Wednesday , Thursday , Friday , Saturday , Weekdays_Max } |
| Weekdays enumeration. More... | |
Functions | |
| const char * | Get_Day_str (const eWeekdays day) |
| Get weekday name string. | |
| const char * | Get_Month_str (const eMonths month) |
| Get month name string. | |
| eWeekdays | Get_Weekday (const uint16_t year, const uint8_t month, const uint8_t day) |
| Determine weekday for a given date. | |
| bool | is_LeapYear (const uint32_t year) |
| Determine if given year is leap. | |
| DateTime | time_t2DateTime (const time_t time) |
| Convert time_t to DateTime. | |
| time_t | DateTime2time_t (const DateTime *const time) |
| Convert DateTime to time_t. | |
| DateTime | diffDateTime (const DateTime *const time2, const DateTime *const time1) |
| Calculate DateTime difference. | |
Time related utilities.
| enum eMonths |
| enum eWeekdays |
| time_t DateTime2time_t | ( | const DateTime *const | time | ) |
| const char * Get_Day_str | ( | const eWeekdays | day | ) |
Get weekday name string.
| [in] | day | - Weekday from eWeekdays enum |
| const char * Get_Month_str | ( | const eMonths | month | ) |
| eWeekdays Get_Weekday | ( | const uint16_t | year, |
| const uint8_t | month, | ||
| const uint8_t | day ) |
Determine weekday for a given date.
| [in] | year | - Year of the given date |
| [in] | month | - Month of the given date (1 to 12) |
| [in] | day | - Day of the given date (1 to 31) |


|
inline |
Determine if given year is leap.
| [in] | year | - Year to test |
