MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / age

Method age

src/pendulum/datetime.py:290–291  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

288
289 @property
290 def age(self) -> int:
291 return self.date().diff(self.now(self.tz).date(), abs=False).in_years()
292
293 def is_local(self) -> bool:
294 return self.offset == self.in_timezone(pendulum.local_timezone()).offset

Callers

nothing calls this directly

Calls 4

dateMethod · 0.95
nowMethod · 0.95
in_yearsMethod · 0.80
diffMethod · 0.45

Tested by

no test coverage detected