aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorVictor Kareh <vkareh@redhat.com>2024-02-12 15:59:40 -0500
committerJF <JF002@users.noreply.github.com>2024-02-18 12:57:48 +0100
commit5d971690cb7fcf51e0215a9eda16136607cf1851 (patch)
tree7ff381007205a932eb0b78b313800e686ce19694 /src/components
parentb0a0afdd4b30a663e1651e63be1549f33fdefb7b (diff)
DateTimeController: Make DayOfWeekShortToStringLow static
This allows it to be used outside of the current datetime context and makes it consistent with the MonthShortToStringLow function.
Diffstat (limited to 'src/components')
-rw-r--r--src/components/datetime/DateTimeController.cpp4
-rw-r--r--src/components/datetime/DateTimeController.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/components/datetime/DateTimeController.cpp b/src/components/datetime/DateTimeController.cpp
index 8d4a834e..f0ccb5e5 100644
--- a/src/components/datetime/DateTimeController.cpp
+++ b/src/components/datetime/DateTimeController.cpp
@@ -115,8 +115,8 @@ const char* DateTime::MonthShortToStringLow(Months month) {
return MonthsStringLow[static_cast<uint8_t>(month)];
}
-const char* DateTime::DayOfWeekShortToStringLow() const {
- return DaysStringShortLow[static_cast<uint8_t>(DayOfWeek())];
+const char* DateTime::DayOfWeekShortToStringLow(Days day) {
+ return DaysStringShortLow[static_cast<uint8_t>(day)];
}
void DateTime::Register(Pinetime::System::SystemTask* systemTask) {
diff --git a/src/components/datetime/DateTimeController.h b/src/components/datetime/DateTimeController.h
index 0bf6ac2a..f719df7d 100644
--- a/src/components/datetime/DateTimeController.h
+++ b/src/components/datetime/DateTimeController.h
@@ -122,7 +122,7 @@ namespace Pinetime {
const char* MonthShortToString() const;
const char* DayOfWeekShortToString() const;
static const char* MonthShortToStringLow(Months month);
- const char* DayOfWeekShortToStringLow() const;
+ static const char* DayOfWeekShortToStringLow(Days day);
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> CurrentDateTime() const {
return currentDateTime;