Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename DAYS_PER_WEEK constant #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/NeoTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const uint8_t MINUTES_PER_HOUR = 60;
const uint16_t SECONDS_PER_HOUR = (uint16_t) SECONDS_PER_MINUTE * MINUTES_PER_HOUR;
const uint8_t HOURS_PER_DAY = 24;
const uint32_t SECONDS_PER_DAY = (uint32_t) SECONDS_PER_HOUR * HOURS_PER_DAY;
const uint8_t DAYS_PER_WEEK = 7;
const uint8_t NEO_DAYS_PER_WEEK = 7;

/**
* Common date/time structure
Expand Down Expand Up @@ -192,7 +192,7 @@ struct time_t {
*/
static uint8_t weekday_for(uint16_t dayno)
{
return ((dayno+epoch_weekday()-1) % DAYS_PER_WEEK) + 1;
return ((dayno+epoch_weekday()-1) % NEO_DAYS_PER_WEEK) + 1;
}

/**
Expand Down