-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdate.h
More file actions
35 lines (32 loc) · 834 Bytes
/
Copy pathdate.h
File metadata and controls
35 lines (32 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef DATE_H
#define DATE_H
#include<QString>
#include<QDate>
#include<iostream>
#include<string>
class date{
QString _today;
double _price =0.5; //price for late turn in (per day)
int _deadline_day=7; //deadline after ${deadline_day} from the issue day
public:
date(){
QDate temp = QDate::currentDate();
_today=QString::number((temp.year()*100+temp.month())*100+temp.day());
}
QString today(){
return _today;
}
double price(){
return _price;
}
int deadline_day(){
return _deadline_day;
}
QDate add_deadline(QDate input){
return input.addDays(_deadline_day);
}
QDate today_Qdate(){
return QDate::currentDate();
}
};
#endif // DATE_H