|
|
|
|
@@ -77,14 +77,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, d);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, d);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, d);
|
|
|
|
|
@@ -138,14 +138,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, dd);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, dd);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, dd);
|
|
|
|
|
@@ -202,14 +202,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, dp);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, dp);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, dp);
|
|
|
|
|
@@ -261,14 +261,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, m);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, m);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, m);
|
|
|
|
|
@@ -318,14 +318,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, wd);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, wd);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, wd);
|
|
|
|
|
@@ -359,14 +359,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, gd);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, gd);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, gd);
|
|
|
|
|
@@ -400,14 +400,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, gy);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, gy);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, gy);
|
|
|
|
|
@@ -458,14 +458,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, pd);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, pd);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, pd);
|
|
|
|
|
@@ -515,14 +515,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, nday);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, nday);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, nday);
|
|
|
|
|
@@ -573,14 +573,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, fkd);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, fkd);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, fkd);
|
|
|
|
|
@@ -631,14 +631,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, lkd);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, lkd);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, lkd);
|
|
|
|
|
@@ -690,14 +690,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, fka);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, fka);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, fka);
|
|
|
|
|
@@ -749,14 +749,14 @@ namespace gregorian {
|
|
|
|
|
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
|
|
|
|
|
if (strm_sentry) {
|
|
|
|
|
try {
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet;
|
|
|
|
|
typedef typename date_time::date_input_facet<date, CharT> date_input_facet_local;
|
|
|
|
|
|
|
|
|
|
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
|
|
|
|
|
if(std::has_facet<date_input_facet>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet>(is.getloc()).get(sit, str_end, is, fkb);
|
|
|
|
|
if(std::has_facet<date_input_facet_local>(is.getloc())) {
|
|
|
|
|
std::use_facet<date_input_facet_local>(is.getloc()).get(sit, str_end, is, fkb);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
date_input_facet* f = new date_input_facet();
|
|
|
|
|
date_input_facet_local* f = new date_input_facet_local();
|
|
|
|
|
std::locale l = std::locale(is.getloc(), f);
|
|
|
|
|
is.imbue(l);
|
|
|
|
|
f->get(sit, str_end, is, fkb);
|
|
|
|
|
|