[[Rcpp::export]]
| 227 | |
| 228 | // [[Rcpp::export]] |
| 229 | Date test_gmtime(double d) { |
| 230 | time_t t = static_cast<time_t>(d); |
| 231 | struct tm tm = *gmtime_(&t); |
| 232 | tm.tm_sec = tm.tm_min = tm.tm_hour = tm.tm_isdst = 0; |
| 233 | Date nd(tm.tm_year, tm.tm_mon + 1, tm.tm_mday); |
| 234 | return nd; |
| 235 | } |
| 236 | |
| 237 | // [[Rcpp::export]] |
| 238 | bool has_na_dv(const Rcpp::DateVector d) { |