-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
25 lines (18 loc) · 710 Bytes
/
Copy pathmain.cpp
File metadata and controls
25 lines (18 loc) · 710 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
#include "datetime.h"
#include <iostream>
#include <time.h>
using namespace std;
int main() {
cout << DateTime::get_current() << endl;
//while (1) {
DateTime a(DateTime::get_current()), b(2013, 1, 1, 0, 0, 0);
b = a - a.Diff(b);
cout << b << endl;
cout << a.get_week() << a.get_time(" неделя: |w или |W, дата(date): |d.|m|M.|y, год: |Y, время: |h:|i:|s\n");
cout << "a = " << a << "\nb = " << b << "\n(a == b) = " << (a == b) << "\n(a < b) = " << (a < b) <<
"\n(a <= b) = " << (a <= b) << "\n(a > b) = " << (a > b) << "\n(a >= b) = " << (a >= b) << endl;
DateTime c("2050, 01, 02* &Ymd&m&i 03.04.05", "|Y, |m, |d* &Ymd&m&i |h.|i.|s");
cout << c << endl;
//}
return 0;
}