|
Pebble Foundation Classes
0.2.0
C++ for Pebble
|
Functions, data structures and other things related to wall clock time. More...

Macros | |
| #define | TIMEZONE_NAME_LENGTH 32 |
| The maximum length for a timezone full name (e.g. America/Chicago) | |
| #define | TIMEZONE_NAME_LENGTH 32 |
| The maximum length for a timezone full name (e.g. America/Chicago) | |
Enumerations | |
| enum | WeekDay { TODAY = 0, SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, TODAY = 0, SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } |
| Weekday values. More... | |
| enum | WeekDay { TODAY = 0, SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, TODAY = 0, SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } |
| Weekday values. More... | |
Functions | |
| void | clock_copy_time_string (char *buffer, uint8_t size) |
| bool | clock_is_24h_style (void) |
| time_t | clock_to_timestamp (WeekDay day, int hour, int minute) |
| bool | clock_is_timezone_set (void) |
| void | clock_get_timezone (char *timezone, const size_t buffer_size) |
Functions, data structures and other things related to wall clock time.
This module contains utilities to get the current time and create strings with formatted dates and times.
| enum WeekDay |
| enum WeekDay |
| void clock_copy_time_string | ( | char * | buffer, |
| uint8_t | size | ||
| ) |
Copies a time string into the buffer, formatted according to the user's time display preferences (such as 12h/24h time). Example results: "7:30" or "15:00".
| [out] | buffer | A pointer to the buffer to copy the time string into |
| size | The maximum size of buffer |
| void clock_get_timezone | ( | char * | timezone, |
| const size_t | buffer_size | ||
| ) |
If timezone is set, copies the current timezone long name (e.g. America/Chicago) to user-provided buffer.
| timezone | A pointer to the buffer to copy the timezone long name into |
| buffer_size | Size of the allocated buffer to copy the timezone long name into |
| bool clock_is_24h_style | ( | void | ) |
Gets the user's 12/24h clock style preference.
true if the user prefers 24h-style time display or false if the user prefers 12h-style time display. | bool clock_is_timezone_set | ( | void | ) |
Checks if timezone is currently set, otherwise gmtime == localtime.
true if timezone has been set, false otherwise | time_t clock_to_timestamp | ( | WeekDay | day, |
| int | hour, | ||
| int | minute | ||
| ) |
Converts a (day, hour, minute) specification to a UTC timestamp occurring in the future Always returns a timestamp for the next occurring instance, example: specifying TODAY@14:30 when it is 14:40 will return a timestamp for 7 days from now at 14:30
| day | WeekDay day of week including support for specifying TODAY |
| hour | hour specified in 24-hour format [0-23] |
| minute | minute [0-59] |