Skip to content

Commit

Permalink
array moved to h instead of cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoimai committed Aug 12, 2013
1 parent 9524d64 commit 5e33638
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions Time/Time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ int year(time_t t) { // the year for the given time
// leap year calulator expects year argument as years offset from 1970
#define LEAP_YEAR(Y) ( ((1970+Y)>0) && !((1970+Y)%4) && ( ((1970+Y)%100) || !((1970+Y)%400) ) )

static const uint8_t monthDays[]={31,28,31,30,31,30,31,31,30,31,30,31}; // API starts months from 1, this array starts from 0

void breakTime(time_t timeInput, tmElements_t &tm){
// break the given time_t into time components
// this is a more compact version of the C library localtime function
Expand Down
1 change: 1 addition & 0 deletions Time/Time.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ typedef struct {
typedef time_t(*getExternalTime)();
//typedef void (*setExternalTime)(const time_t); // not used in this version

static const uint8_t monthDays[]={31,28,31,30,31,30,31,31,30,31,30,31}; // API starts months from 1, this array starts from 0

/*==============================================================================*/
/* Useful Constants */
Expand Down

0 comments on commit 5e33638

Please sign in to comment.