MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / test_gmtime

Function test_gmtime

inst/tinytest/cpp/dates.cpp:229–235  ·  view source on GitHub ↗

[[Rcpp::export]]

Source from the content-addressed store, hash-verified

227
228// [[Rcpp::export]]
229Date 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]]
238bool has_na_dv(const Rcpp::DateVector d) {

Callers

nothing calls this directly

Calls 1

gmtime_Function · 0.50

Tested by

no test coverage detected