labs-edaf30/lab4/date.h
Sven Gestegard Robertz e4df45f4a9 imported lab skeletons
2021-10-27 15:39:22 +02:00

19 lines
503 B
C++

#ifndef DATE_H
#define DATE_H
class Date {
public:
Date(); // today's date
Date(int y, int m, int d); // yyyy-mm-dd
int getYear() const; // get the year
int getMonth() const; // get the month
int getDay() const; // get the day
void next(); // advance to next day
private:
int year; // the year (four digits)
int month; // the month (1-12)
int day; // the day (1-..)
static int daysPerMonth[12]; // number of days in each month
};
#endif