From b5fbcf0eee4398b4d5c0fdb7add00b4d2b18691f Mon Sep 17 00:00:00 2001 From: Diego Miguel Date: Wed, 2 Mar 2022 00:33:08 +0100 Subject: [PATCH] Add lowercase days of the week --- src/components/datetime/DateTimeController.cpp | 5 +++++ src/components/datetime/DateTimeController.h | 1 + 2 files changed, 6 insertions(+) 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(month)]; } +const char* DateTime::DayOfWeekShortToStringLow() { + return DaysStringShortLow[static_cast(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 CurrentDateTime() const { return currentDateTime;