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

Function Datetime_get_functions

inst/tinytest/cpp/dates.cpp:112–122  ·  view source on GitHub ↗

[[Rcpp::export]]

Source from the content-addressed store, hash-verified

110
111// [[Rcpp::export]]
112List Datetime_get_functions(Datetime x) {
113 Datetime dt = Datetime(x);
114 return List::create(Named("year") = dt.getYear(),
115 Named("month") = dt.getMonth(),
116 Named("day") = dt.getDay(),
117 Named("wday") = dt.getWeekday(),
118 Named("hour") = dt.getHours(),
119 Named("minute") = dt.getMinutes(),
120 Named("second") = dt.getSeconds(),
121 Named("microsec") = dt.getMicroSeconds());
122}
123
124// [[Rcpp::export]]
125List Datetime_operators() {

Callers

nothing calls this directly

Calls 10

NamedFunction · 0.85
getHoursMethod · 0.80
getMinutesMethod · 0.80
getSecondsMethod · 0.80
getMicroSecondsMethod · 0.80
DatetimeClass · 0.50
getYearMethod · 0.45
getMonthMethod · 0.45
getDayMethod · 0.45
getWeekdayMethod · 0.45

Tested by

no test coverage detected