From fbaf1e7e8672ecd072d96d062386a6abe592c209 Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Wed, 14 Dec 2022 15:40:42 +0000 Subject: deploy: 0be39a85fcf1431c3a49252848ef79a96d3586fd --- group__utility.html | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) (limited to 'group__utility.html') diff --git a/group__utility.html b/group__utility.html index 8c442680..245a0ab2 100644 --- a/group__utility.html +++ b/group__utility.html @@ -91,6 +91,18 @@ Functions const char * watch_utility_get_weekday (watch_date_time date_time)  Returns a two-letter weekday for the given timestamp, suitable for display in positions 0-1 of the watch face. More...
  +uint8_t watch_utility_get_iso8601_weekday_number (uint16_t year, uint8_t month, uint8_t day) + Returns a number between 1-7 representing the weekday according to ISO8601 : week starts on Monday and has index 1, Sunday has index 7. More...
+  +uint8_t watch_utility_get_weeknumber (uint16_t year, uint8_t month, uint8_t day) + Returns a number between 1-53 representing the weeknumber according to ISO8601 : First week of the year always contains Thursday. If it overlaps on previous year, current year has 53 weeks. More...
+  +uint16_t watch_utility_days_since_new_year (uint16_t year, uint8_t month, uint8_t day) + Returns a number between 1-366 representing the elapsed days since January 1st the same year. More...
+  +uint8_t is_leap (uint16_t year) + Returns 1 if year is leap and 0 otherwise. More...
+  uint32_t watch_utility_convert_to_unix_time (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t utc_offset)  Returns the UNIX time (seconds since 1970) for a given date/time in UTC. More...
  @@ -134,6 +146,32 @@ uint32_t watch_duration_t:

Detailed Description

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

Function Documentation

+ +

◆ is_leap()

+ +
+
+ + + + + + + + +
uint8_t is_leap (uint16_t year)
+
+ +

Returns 1 if year is leap and 0 otherwise.

+
Parameters
+ + +
yearThe year (ex. 2022)
+
+
+ +
+

◆ watch_utility_convert_to_12_hour()

@@ -358,6 +396,94 @@ uint32_t watch_duration_t:
Returns
A UNIX timestamp for the given watch_date_time and UTC offset.
+ + + +

◆ watch_utility_days_since_new_year()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uint16_t watch_utility_days_since_new_year (uint16_t year,
uint8_t month,
uint8_t day 
)
+
+ +

Returns a number between 1-366 representing the elapsed days since January 1st the same year.

+
Parameters
+ + + + +
yearThe year of the date
monthThe month of the date (1-12)
dayThe day of the date (1-31)
+
+
+ +
+
+ +

◆ watch_utility_get_iso8601_weekday_number()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uint8_t watch_utility_get_iso8601_weekday_number (uint16_t year,
uint8_t month,
uint8_t day 
)
+
+ +

Returns a number between 1-7 representing the weekday according to ISO8601 : week starts on Monday and has index 1, Sunday has index 7.

+
Parameters
+ + + + +
yearThe year of the date
monthThe month of the date (1-12)
dayThe day of the date (1-31)
+
+
+
@@ -384,6 +510,50 @@ uint32_t watch_duration_t: + + + +

◆ watch_utility_get_weeknumber()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uint8_t watch_utility_get_weeknumber (uint16_t year,
uint8_t month,
uint8_t day 
)
+
+ +

Returns a number between 1-53 representing the weeknumber according to ISO8601 : First week of the year always contains Thursday. If it overlaps on previous year, current year has 53 weeks.

+
Parameters
+ + + + +
yearThe year of the date
monthThe month of the date (1-12)
dayThe day of the date (1-31)
+
+
+
-- cgit v1.2.3