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

Class MonthBegin

xarray/coding/cftime_offsets.py:378–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376
377
378class MonthBegin(BaseCFTimeOffset):
379 _freq = "MS"
380
381 def __apply__(self, other):
382 n = _adjust_n_months(other.day, self.n, 1)
383 return _shift_month(other, n, "start")
384
385 def onOffset(self, date) -> bool:
386 """Check if the given date is in the set of possible dates created
387 using a length-one version of this offset class."""
388 return date.day == 1
389
390
391class MonthEnd(BaseCFTimeOffset):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…