| 141 | // needed to wrap containers of Date such as vector<Date> or map<string,Date> |
| 142 | namespace internal { |
| 143 | template<> inline double caster<Rcpp::Date,double>(Rcpp::Date from) { |
| 144 | return static_cast<double>(from.getDate()); |
| 145 | } |
| 146 | template<> inline Rcpp::Date caster<double,Rcpp::Date>(double from) { |
| 147 | return Rcpp::Date(static_cast<int>(from)); |
| 148 | } |