Skip to content

Commit

Permalink
Fixed bug #13
Browse files Browse the repository at this point in the history
  • Loading branch information
SV-Zanshin authored and SV-Zanshin committed Jun 21, 2018
1 parent 0380b5b commit 5edded7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MCP7940.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ DateTime::DateTime (const __FlashStringHelper* date, //
*******************************************************************************************************************/
uint8_t DateTime::dayOfTheWeek() const { // Compute the DOW //
uint16_t day = date2days(yOff, m, d); // compute the number of days //
return (day + 6) % 7; // Jan 1, 2000 is a Saturday, i.e. 6//
return ((day + 6) % 7)+1; // Jan 1, 2000 is a Saturday, i.e. 7//
} // of method dayOfTheWeek() // //
/*******************************************************************************************************************
** Function unixtime() to return the UNIX time, which is seconds since 1970-01-01 00:00:00 **
Expand Down
1 change: 1 addition & 0 deletions MCP7940.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
** **
** Vers. Date Developer Comments **
** ====== ========== ============================= ============================================================== **
** 1.0.7 2018-06-21 https://github.com/SV-Zanshin Bug #13 - DateTime.dayOfTheWeek() is 0-6 instead of 1-7 **
** 1.0.6 2018-04-29 https://github.com/SV-Zanshin Bug #7 - Moved setting of param defaults to prototypes **
** 1.0.6 2018-04-29 https://github.com/SV-Zanshin Bug #10 - incorrect setting of alarm with WKDAY to future date **
** 1.0.5b 2017-12-18 https://github.com/SV-Zanshin Bug #8 - incorrect setting to 24-Hour clock **
Expand Down

0 comments on commit 5edded7

Please sign in to comment.