7 #include <pybind11/pybind11.h> 11 template <>
struct type_caster<std::chrono::year_month_day> {
12 PYBIND11_TYPE_CASTER(std::chrono::year_month_day, _(
"datetime.date"));
13 static handle cast(std::chrono::year_month_day ymd, return_value_policy, handle) {
14 return pybind11::module_::import(
"datetime").attr(
"date")(
16 unsigned(ymd.month()),
Definition: pybindSupp.h:9