From 12daf390078506a2a48c331752a5c69894aa01ec Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Tue, 1 Feb 2022 05:24:57 +0000 Subject: deploy: a3085cb1364cba787ede58a35f3106108604b283 --- group__utility.html | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'group__utility.html') diff --git a/group__utility.html b/group__utility.html index 4c31d1e0..ac950def 100644 --- a/group__utility.html +++ b/group__utility.html @@ -87,6 +87,9 @@ Functions watch_date_time watch_utility_date_time_from_unix_time (uint32_t timestamp, uint32_t utc_offset)  Returns the UNIX time (seconds since 1970) for a given watch_date_time struct. More...
  +bool watch_utility_convert_to_12_hour (watch_date_time *date_time) + Converts a watch_date_time for 12-hour display. More...
watch_date_time watch_utility_date_time_convert_zone (watch_date_time date_time, uint32_t origin_utc_offset, uint32_t destination_utc_offset)  Converts a time from a given time zone to another time zone. More...
  @@ -97,6 +100,34 @@ Functions

Detailed Description

This section covers various useful functions that don't fit anywhere else.

Function Documentation

+ +

◆ watch_utility_convert_to_12_hour()

+ +
+
+ + + + + + + + +
bool watch_utility_convert_to_12_hour (watch_date_timedate_time)
+
+ +

Converts a watch_date_time for 12-hour display.

+
Parameters
+ + +
date_timeA pointer to the watch_date_time that you wish to convert for display. Note that this function will OVERWRITE the original date/time, rendering it invalid for date/time calculations. Midnight (hour 0) will become 12, and hours in the afternoon will wrap back around to values from 1-11.
+
+
+
Returns
True if the value is in the afternoon. You can use this value to determine whether to set the PM indicator on the LCD.
+
Note
This function sort of abuses the watch_date_time struct; the date/time that results from calling this function is clamped to the hours of 1:00:00 AM through 12:59:59 PM. It no longer reflects a valid watch_date_time for writing to an RTC register.
+ +
+

◆ watch_utility_convert_to_unix_time()

-- cgit v1.2.3