5
5
6
6
#include " cookie_date.h"
7
7
8
+ using std::out_of_range;
9
+ using std::ostringstream;
10
+
8
11
// Implementation of constructor with parameters.
9
12
curl::cookie_date::cookie_date (const unsigned int week_day, const unsigned int day, const unsigned int month, const unsigned int year) NOEXCEPT {
10
13
this ->set_week_day (week_day)->set_day (day)->set_month (month)->set_year (year);
@@ -14,7 +17,7 @@ curl::cookie_date::cookie_date(const unsigned int week_day, const unsigned int d
14
17
curl::cookie_date *curl::cookie_date::set_week_day (const unsigned int week_day) NOEXCEPT {
15
18
try {
16
19
this ->week_day = details::weekday_names.at (week_day);
17
- } catch (const std:: out_of_range &exception) {
20
+ } catch (const out_of_range &exception) {
18
21
this ->week_day = " Mon" ;
19
22
}
20
23
return this ;
@@ -30,7 +33,7 @@ curl::cookie_date *curl::cookie_date::set_day(const unsigned int day) NOEXCEPT {
30
33
curl::cookie_date *curl::cookie_date::set_month (const unsigned int month) {
31
34
try {
32
35
this ->month = details::months_names.at (month);
33
- } catch (const std:: out_of_range &exception) {
36
+ } catch (const out_of_range &exception) {
34
37
this ->month = " Jan" ;
35
38
}
36
39
return this ;
@@ -63,7 +66,7 @@ unsigned int curl::cookie_date::get_year() const NOEXCEPT {
63
66
64
67
// Implementation of get_formatted method.
65
68
std::string curl::cookie_date::get_formatted () NOEXCEPT {
66
- std:: ostringstream stream;
69
+ ostringstream stream;
67
70
stream<<this ->week_day <<" , " <<this ->day <<" -" <<this ->month <<" -" <<this ->year ;
68
71
return stream.str ();
69
72
}
0 commit comments