-
-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathcookie_datetime.cpp
More file actions
38 lines (31 loc) · 1.07 KB
/
cookie_datetime.cpp
File metadata and controls
38 lines (31 loc) · 1.07 KB
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
36
37
38
/**
* File: cookie_datetime.cpp
* Author: Giuseppe Persico
*/
#include "cookie_datetime.h"
// Implementation of constructor with parameters.
curl::cookie_datetime::cookie_datetime(const cookie_time &time, const cookie_date &date) NOEXCEPT {
this->set_time(time)->set_date(date);
}
// Implementation of set_time method.
curl::cookie_datetime *curl::cookie_datetime::set_time(const cookie_time &cookieTime) NOEXCEPT {
this->time = cookieTime;
return this;
}
// Implementation of set_date method.
curl::cookie_datetime *curl::cookie_datetime::set_date(const cookie_date &cookieDate) NOEXCEPT {
this->date = cookieDate;
return this;
}
// Implementation of get_time method.
curl::cookie_time curl::cookie_datetime::get_time() const NOEXCEPT {
return this->time;
}
// Implementation of get_date method.
curl::cookie_date curl::cookie_datetime::get_date() const NOEXCEPT {
return this->date;
}
// Implementation of get method.
std::string curl::cookie_datetime::get_formatted() NOEXCEPT {
return this->date.get_formatted()+" "+this->time.get_formatted();
}