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

Method rollforward

xarray/coding/cftime_offsets.py:572–577  ·  view source on GitHub ↗

Roll date forward to nearest start of year

(self, date)

Source from the content-addressed store, hash-verified

570 return date.day == 1 and date.month == self.month
571
572 def rollforward(self, date):
573 """Roll date forward to nearest start of year"""
574 if self.onOffset(date):
575 return date
576 else:
577 return date + YearBegin(month=self.month)
578
579 def rollback(self, date):
580 """Roll date backward to nearest start of year"""

Callers

nothing calls this directly

Calls 2

onOffsetMethod · 0.95
YearBeginClass · 0.85

Tested by

no test coverage detected