MCPcopy Index your code
hub / github.com/pydata/xarray / _get_normalized_cfdate

Function _get_normalized_cfdate

xarray/coding/cftime_offsets.py:855–862  ·  view source on GitHub ↗

convert to cf datetime and round down to midnight if normalize.

(date, calendar, normalize)

Source from the content-addressed store, hash-verified

853
854
855def _get_normalized_cfdate(date, calendar, normalize):
856 """convert to cf datetime and round down to midnight if normalize."""
857 if date is None:
858 return date
859
860 cf_date = to_cftime_datetime(date, calendar)
861
862 return normalize_date(cf_date) if normalize else cf_date
863
864
865def _generate_linear_date_range(start, end, periods):

Callers 1

_cftime_rangeFunction · 0.85

Calls 2

to_cftime_datetimeFunction · 0.85
normalize_dateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…