MCPcopy Create free account
hub / github.com/SmingHub/Sming / getOffsetString

Method getOffsetString

Sming/Core/DateTime.cpp:91–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91String DateTime::ZoneInfo::getOffsetString(char sep) const
92{
93 String s;
94 auto mins = offsetMins;
95 if(mins < 0) {
96 s += '-';
97 mins = -mins;
98 } else {
99 s += '+';
100 }
101 s.concat(mins / MINS_PER_HOUR, DEC, 2);
102 if(sep) {
103 s += sep;
104 }
105 s.concat(mins % MINS_PER_HOUR, DEC, 2);
106 return s;
107}
108
109bool DateTime::isLeapYear(uint16_t year)
110{

Callers 1

formatMethod · 0.80

Calls 1

concatMethod · 0.45

Tested by

no test coverage detected