mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +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")
|
raise ValueError("Second must be between 0 and 59")
|
||||||
self.second = second
|
self.second = second
|
||||||
|
|
||||||
|
def date(self) -> date:
|
||||||
|
return date(self.year, self.month, self.day)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def now():
|
def now():
|
||||||
t = localtime()
|
t = localtime()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user