AceTime
0.1
Date and time classes for Arduino that supports the TZ DAtabase, and a system clock synchronized from an NTP server or an RTC chip.
|
Class that translates a numeric month (1-12) or weekDay (1-7) into a human readable string. More...
#include <DateStrings.h>
Public Member Functions | |
const char * | monthLongString (uint8_t month) const |
Return the long month name. More... | |
const char * | monthShortString (uint8_t month) const |
Return the short month name. More... | |
const char * | weekDayLongString (uint8_t weekDay) const |
Return the short weekDay name. More... | |
const char * | weekDayShortString (uint8_t weekDay) const |
Return the short weekDay 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 weekDay (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 22 of file DateStrings.h.
|
inline |
Return the long month name.
0=Error, 1=January, 12=December.
Definition at line 33 of file DateStrings.h.
|
inline |
|
inline |
Return the short weekDay name.
0=Error, 1=Monday, 7=Sunday.
Definition at line 48 of file DateStrings.h.
|
inline |
|
static |
Number of prefix characters to use to create a short name.
Definition at line 30 of file DateStrings.h.