The documentation of `DateTime::DateTime(year, month...)' has been updated
to mention that a DateTime can be invalid and that its validity can be
tested with `isValid()'.
Fixes #127.
The `long' return type would roll over at 2068-01-19 03:14:08. Using
`uint32_t' postpones the rollover to 2136-02-07 06:28:16. The method now
works correctly up to 2100-02-28 23:59:59, right before the leap year
computation fails.
I combined the two toString() functions into one function that searches for the "ap" or "AP" tag (returns lower and uppercase AM/PM, respectively) to output 12-Hour time. Thanks @edgar-bonet
I added a DateTime::twelveHour function that returns the hour on a range of 1-12 for 12-Hour use, as well as a DateTime::isPM function that returns true if the time is PM.
I added the to12hrString function that outputs the DateTime object in a 12-Hour format. Use the "aa" tag for the AM/PM indicator. Other than the new tag and twelve-hour conversion, it's the same as the toString function.
The current RTC_DS3231::getTemperature function does not handle negative Celsius temperatures correctly. This correct behavior can be achieved by using a signed 8-bit integer type for the variable "msb" as this allows the sign to be retained for the subsequent float conversion. Line 1064 was changed to move the "msb" variable to a new line with the int8_t typing. This was tested on an UNO R3 and DS3231 module using a small, frozen blue-ice block with a foam drink cover to achieve negative Celsius temperatures for the DS3231 module.
RTC_DS3231::begin now tests connection with DS3231 by using Wire.beginTransmission and Wire.endTransmission before returning true. Returns false is DS3231 is not found.
This array is used in computations where the total number of days from
the previous months in the year is added or subtracted from a day count.
Since December is never among the previous months, the twelfth cell in
the array is not useful.
Fixes #114: an incompatibility with Paul Stoffregen's Time library
arising from both libraries defining identical arrays of constants.
This is identical to RTC_Millis, except for:
* The method now() has to be called more often than once every 71.6
minutes.
* The clock can be syntonized (i.e. its drift tuned) with a 1 ppm
resolution using adjustDrift(): a positive adjustment makes the clock
faster.
Note that syntonization does not introduce time discontinuities.