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

Method rollback

xarray/coding/cftime_offsets.py:604–609  ·  view source on GitHub ↗

Roll date backward to nearest end of year

(self, date)

Source from the content-addressed store, hash-verified

602 return date + YearEnd(month=self.month)
603
604 def rollback(self, date):
605 """Roll date backward to nearest end of year"""
606 if self.onOffset(date):
607 return date
608 else:
609 return date - YearEnd(month=self.month)
610
611
612class Day(BaseCFTimeOffset):

Callers 3

_get_range_edgesFunction · 0.45
test_rollbackFunction · 0.45

Calls 2

onOffsetMethod · 0.95
YearEndClass · 0.85

Tested by 1

test_rollbackFunction · 0.36