labs-edaf30/lab4/date.h

20 lines
503 B
C
Raw Normal View History

2021-10-27 15:15:47 +02:00
#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