File tree 2 files changed +16
-19
lines changed
2 files changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -94,21 +94,18 @@ class RTCTime {
94
94
bool setDayOfWeek (DayOfWeek d);
95
95
bool setSaveLight (SaveLight sl);
96
96
bool setUnixTime (time_t time);
97
-
98
97
void setTM (struct tm &t);
99
- /* getters */
100
- int getDayOfMonth ();
101
- Month getMonth () ;
102
- int getYear () ;
103
- int getHour () ;
104
- int getMinutes () ;
105
- int getSeconds () ;
106
- DayOfWeek getDayOfWeek () ;
107
-
98
+
99
+ /* Getters */
100
+ int getDayOfMonth () const ;
101
+ Month getMonth () const ;
102
+ int getYear () const ;
103
+ int getHour () const ;
104
+ int getMinutes () const ;
105
+ int getSeconds () const ;
106
+ DayOfWeek getDayOfWeek () const ;
108
107
time_t getUnixTime ();
109
108
struct tm getTmTime ();
110
- };
111
-
112
109
113
110
114
111
enum class Period {
Original file line number Diff line number Diff line change @@ -350,13 +350,13 @@ bool RTCTime::setUnixTime(time_t time) {
350
350
}
351
351
352
352
/* getters */
353
- int RTCTime::getDayOfMonth () { return day; }
354
- Month RTCTime::getMonth () { return month; }
355
- int RTCTime::getYear () { return year >= TM_YEAR_OFFSET ? year : year + TM_YEAR_OFFSET; }
356
- int RTCTime::getHour () { return hours; }
357
- int RTCTime::getMinutes () { return minutes; }
358
- int RTCTime::getSeconds () { return seconds; }
359
- DayOfWeek RTCTime::getDayOfWeek () { return day_of_week; }
353
+ int RTCTime::getDayOfMonth () const { return day; }
354
+ Month RTCTime::getMonth () const { return month; }
355
+ int RTCTime::getYear () const { return year >= TM_YEAR_OFFSET ? year : year + TM_YEAR_OFFSET; }
356
+ int RTCTime::getHour () const { return hours; }
357
+ int RTCTime::getMinutes () const { return minutes; }
358
+ int RTCTime::getSeconds () const { return seconds; }
359
+ DayOfWeek RTCTime::getDayOfWeek () const { return day_of_week; }
360
360
361
361
time_t RTCTime::getUnixTime () { return mktime ( (struct tm *)&stime ); }
362
362
struct tm RTCTime::getTmTime () { return (struct tm )stime; }
You can’t perform that action at this time.
0 commit comments