|
PebbleOS
|
Macros | |
| #define | PBL_TM_YEAR_ORIGIN 1900 |
Year that tm_year in struct tm counts from. | |
| #define | PBL_EPOCH_YEAR 1970 |
| Year of the Unix epoch. | |
| #define | PBL_EPOCH_WDAY 4 |
| Day of the week of the Unix epoch (Thursday), as an enum pbl_weekday value. | |
Enumerations | |
| enum | pbl_weekday { PBL_SUNDAY = 0 , PBL_MONDAY , PBL_TUESDAY , PBL_WEDNESDAY , PBL_THURSDAY , PBL_FRIDAY , PBL_SATURDAY } |
Day of the week, numbered like tm_wday. More... | |
Functions | |
| static bool | pbl_time_is_weekday (enum pbl_weekday day) |
| Check whether a day is a working day (Monday to Friday). | |
| static bool | pbl_time_is_weekend (enum pbl_weekday day) |
| Check whether a day is on the weekend (Saturday or Sunday). | |
| bool | pbl_time_is_leap_year (int year) |
| Check whether a Gregorian year is a leap year. | |
| int | pbl_time_days_in_month (int month, bool is_leap_year) |
| Get the number of days in a month. | |
| void | pbl_time_split_seconds (uint32_t seconds, uint32_t *days, uint32_t *hours, uint32_t *minutes, uint32_t *secs) |
| Split a duration into days, hours, minutes and seconds. | |
| int | pbl_time_display_hour (int hour, bool is_24h) |
| Convert an hour of the day to the hour shown on a clock. | |
| int | pbl_time_minute_of_day_adjust (int minute, int delta) |
| Add a delta to a minute of the day, wrapping around midnight. | |
| void | pbl_time_breakdown (time_t t, struct tm *tm) |
| Fill the calendar fields of a struct tm from seconds since the epoch. | |