Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
date
Method · 0.95
now
Method · 0.95
in_years
Method · 0.80
diff
Method · 0.45
Tested by
no test coverage detected