diff options
author | Diego Miguel <dmlls@diegomiguel.me> | 2022-03-02 00:33:08 +0100 |
---|---|---|
committer | Diego Miguel <dmlls@diegomiguel.me> | 2022-06-11 16:56:35 +0200 |
commit | b5fbcf0eee4398b4d5c0fdb7add00b4d2b18691f (patch) | |
tree | de0f989b3d4aedca30cf00e1c77be8b73e6f0a63 /src/components | |
parent | da2cf8e913c5e60ec445a22e2b37f78e91ef6a85 (diff) |
Add lowercase days of the week
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/datetime/DateTimeController.cpp | 5 | ||||
-rw-r--r-- | src/components/datetime/DateTimeController.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/components/datetime/DateTimeController.cpp b/src/components/datetime/DateTimeController.cpp index ba04705f..f71911ef 100644 --- a/src/components/datetime/DateTimeController.cpp +++ b/src/components/datetime/DateTimeController.cpp @@ -7,6 +7,7 @@ using namespace Pinetime::Controllers; namespace { char const* DaysStringShort[] = {"--", "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"}; + char const* DaysStringShortLow[] = {"--", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; char const* MonthsString[] = {"--", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"}; char const* MonthsStringLow[] = {"--", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; } @@ -126,6 +127,10 @@ const char* DateTime::MonthShortToStringLow(Months month) { return MonthsStringLow[static_cast<uint8_t>(month)]; } +const char* DateTime::DayOfWeekShortToStringLow() { + return DaysStringShortLow[static_cast<uint8_t>(dayOfWeek)]; +} + void DateTime::Register(Pinetime::System::SystemTask* systemTask) { this->systemTask = systemTask; } diff --git a/src/components/datetime/DateTimeController.h b/src/components/datetime/DateTimeController.h index 00bbc2ee..4eddc5a7 100644 --- a/src/components/datetime/DateTimeController.h +++ b/src/components/datetime/DateTimeController.h @@ -64,6 +64,7 @@ namespace Pinetime { const char* MonthShortToString() const; const char* DayOfWeekShortToString() const; static const char* MonthShortToStringLow(Months month); + const char* DayOfWeekShortToStringLow(); std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> CurrentDateTime() const { return currentDateTime; |