mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
add .date()
This commit is contained in:
parent
0a63fcb7b0
commit
ce1bc278e3
@ -91,6 +91,9 @@ class datetime(date):
|
||||
raise ValueError("Second must be between 0 and 59")
|
||||
self.second = second
|
||||
|
||||
def date(self) -> date:
|
||||
return date(self.year, self.month, self.day)
|
||||
|
||||
@staticmethod
|
||||
def now():
|
||||
t = localtime()
|
||||
|
Loading…
x
Reference in New Issue
Block a user