40 class_<DateAndTime>(
"DateAndTime", no_init)
42 .def(init<const std::string>((arg(
"self"), arg(
"ISO8601 string")),
"Construct from an ISO8601 string"))
43 .def(init<double, double>((arg(
"self"), arg(
"seconds"), arg(
"nanoseconds")),
44 "Construct using a number of seconds and nanoseconds (floats)since "
46 .def(init<int64_t, int64_t>((arg(
"self"), arg(
"seconds"), arg(
"nanoseconds")),
47 "Construct using a number of seconds and nanoseconds (integers) "
48 "since 1990-01-01T00:00"))
49 .def(init<int64_t>((arg(
"self"), arg(
"total_nanoseconds")),
50 "Construct a total number of nanoseconds since 1990-01-01T00:00"))
52 "Construct from numpy.datetime64")
53 .def(
"total_nanoseconds", &
total_nanoseconds, arg(
"self"),
"Since 1990-01-01T00:00")
54 .def(
"totalNanoseconds", &DateAndTime::totalNanoseconds, arg(
"self"),
"Since 1990-01-01T00:00")
55 .def(
"toISO8601String", &DateAndTime::toISO8601String, arg(
"self"),
56 "Converts the time into ISO8601Standard and returns the string")
57 .def(
"setToMinimum", &DateAndTime::setToMinimum, arg(
"self"))
59 "Convert to numpy.datetime64")
62 .def(
"__long__", &DateAndTime::totalNanoseconds, arg(
"self"))
63 .def(
"__int__", &DateAndTime::totalNanoseconds, arg(
"self"))
68 .def(self + int64_t())
69 .def(self += int64_t())
70 .def(self - int64_t())
71 .def(self -= int64_t())
82 class_<time_duration>(
"time_duration", no_init)
83 .def(
"hours", &time_duration::hours, arg(
"self"),
"Returns the normalized number of hours")
84 .def(
"minutes", &time_duration::minutes, arg(
"self"),
"Returns the normalized number of minutes +/-(0..59)")
85 .def(
"seconds", &time_duration::seconds, arg(
"self"),
"Returns the normalized number of seconds +/-(0..59)")
86 .def(
"total_seconds", &time_duration::total_seconds, arg(
"self"),
87 "Get the total number of seconds truncating any fractional seconds")
88 .def(
"total_milliseconds", &time_duration::total_milliseconds, arg(
"self"),
89 "Get the total number of milliseconds truncating any remaining "
91 .def(
"total_microseconds", &time_duration::total_microseconds, arg(
"self"),
92 "Get the total number of microseconds truncating any remaining "
95 "Get the total number of nanoseconds truncating any remaining "
97 .def(
"totalNanoseconds", &time_duration::total_nanoseconds, arg(
"self"),
98 "Get the total number of nanoseconds truncating any remaining "