(
units: str,
)
| 311 | |
| 312 | |
| 313 | def _unpack_time_unit_and_ref_date( |
| 314 | units: str, |
| 315 | ) -> tuple[NPDatetimeUnitOptions, pd.Timestamp]: |
| 316 | # same us _unpack_netcdf_time_units but finalizes ref_date for |
| 317 | # processing in encode_cf_datetime |
| 318 | time_unit, _ref_date = _unpack_netcdf_time_units(units) |
| 319 | time_unit = _netcdf_to_numpy_timeunit(time_unit) |
| 320 | ref_date = pd.Timestamp(_ref_date) |
| 321 | ref_date = _cast_timestamp_to_coarsest_resolution(ref_date) |
| 322 | ref_date = _maybe_strip_tz_from_timestamp(ref_date) |
| 323 | return time_unit, ref_date |
| 324 | |
| 325 | |
| 326 | def _unpack_time_units_and_ref_date_cftime(units: str, calendar: str): |
no test coverage detected
searching dependent graphs…