AceTime
3.0.0
Date and time classes for Arduino that support timezones from the TZ Database.
|
Class that translates a numeric month (1-12) or dayOfWeek (1-7) into a human readable string. More...
#include <DateStrings.h>
Public Member Functions | |
const char * | monthLongString (uint8_t month) |
Return the long month name. More... | |
const char * | monthShortString (uint8_t month) |
Return the short month name. More... | |
const char * | dayOfWeekLongString (uint8_t dayOfWeek) |
Return the short dayOfWeek name. More... | |
const char * | dayOfWeekShortString (uint8_t dayOfWeek) |
Return the short dayOfWeek name. More... | |
Static Public Attributes | |
static const uint8_t | kBufferSize = 10 |
Length of the longest month or week name, including the '\0' terminator. | |
static const uint8_t | kShortNameLength = 3 |
Number of prefix characters to use to create a short name. More... | |
Class that translates a numeric month (1-12) or dayOfWeek (1-7) into a human readable string.
Both long and short versions can be retrieved. The object uses an internal char[] buffer to store the result strings, so the strings must be used before DateStrings object is destroyed. This also means that the object is not thread-safe but Arduino boards are single-threaded currently so we don't have to worry about this.
Inspired by the DateStrings.cpp file in https://github.com/PaulStoffregen/Time/blob/master/DateStrings.cpp.
Definition at line 26 of file DateStrings.h.
|
inline |
Return the short dayOfWeek name.
0=Error, 1=Monday, 7=Sunday.
Definition at line 56 of file DateStrings.h.
|
inline |
|
inline |
Return the long month name.
0=Error, 1=January, 12=December.
Definition at line 40 of file DateStrings.h.
|
inline |
|
static |
Number of prefix characters to use to create a short name.
kShortNameLength < kBufferSize must be true.
Definition at line 37 of file DateStrings.h.