Parcourir la source

Create datetime.md

BLUELOVETH il y a 2 ans
Parent
commit
34f3845c9f
1 fichiers modifiés avec 81 ajouts et 0 suppressions
  1. 81 0
      docs/modules/datetime.md

+ 81 - 0
docs/modules/datetime.md

@@ -0,0 +1,81 @@
+---
+icon: package
+label: datetime
+---
+
+!!!
+This module is not available now.
+!!!
+
+```python
+'''
+object
+    timedelta
+    timezone
+    date
+        datetime
+'''
+
+class date:
+    @staticmethod
+    def today() -> 'date': ...
+
+    def __init__(self, year, month=None, day=None): ...
+
+    @property
+    def year(self) -> int: ...
+    @property
+    def month(self) -> int: ...
+    @property
+    def day(self) -> int: ...
+
+    def __repr__(self) -> str: ...
+
+    def __eq__(self, other: 'date') -> bool: ...
+    def __lt__(self, other: 'date') -> bool: ...
+    def __le__(self, other: 'date') -> bool: ...
+    def __gt__(self, other: 'date') -> bool: ...
+    def __ge__(self, other: 'date') -> bool: ...
+
+    def __add__(self, other: 'timedelta') -> 'date': ...
+    def __sub__(self, other: 'timedelta') -> 'date': ...
+
+class datetime(date):
+    @staticmethod
+    def now() -> 'datetime': ...
+
+    def __init__(self, year, month=None, day=None, hour=None, minute=None, second=None, tzinfo=None): ...
+
+    @property
+    def hour(self) -> int: ...
+    @property
+    def minute(self) -> int: ...
+    @property
+    def second(self) -> int: ...
+    @property
+    def tzinfo(self) -> 'timezone': ...
+
+    def __repr__(self) -> str: ...
+
+    def __eq__(self, other) -> bool: ...
+    def __lt__(self, other) -> bool: ...
+    def __le__(self, other) -> bool: ...
+    def __gt__(self, other) -> bool: ...
+    def __ge__(self, other) -> bool: ...
+
+    def __add__(self, other: 'timedelta') -> 'datetime': ...
+    def __sub__(self, other: 'timedelta') -> 'datetime': ...
+
+    def timestamp(self) -> float: ...
+
+class timedelta:
+    def __init__(days, seconds): ...
+
+    def __repr__(self) -> str: ...
+
+    def __eq__(self, other: 'timedelta') -> bool: ...
+    def __lt__(self, other: 'timedelta') -> bool: ...
+    def __le__(self, other: 'timedelta') -> bool: ...
+    def __gt__(self, other: 'timedelta') -> bool: ...
+    def __ge__(self, other: 'timedelta') -> bool: ...
+```