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

Method rollback

xarray/coding/cftime_offsets.py:579–584  ·  view source on GitHub ↗

Roll date backward to nearest start of year

(self, date)

Source from the content-addressed store, hash-verified

577 return date + YearBegin(month=self.month)
578
579 def rollback(self, date):
580 """Roll date backward to nearest start of year"""
581 if self.onOffset(date):
582 return date
583 else:
584 return date - YearBegin(month=self.month)
585
586
587class YearEnd(YearOffset):

Callers

nothing calls this directly

Calls 2

onOffsetMethod · 0.95
YearBeginClass · 0.85

Tested by

no test coverage detected