mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 12:14:28 +08:00
Add timezone.localdate() (#87)
This commit is contained in:
committed by
Maxim Kurnikov
parent
90cab6c5bf
commit
db7b46589f
@@ -1,5 +1,5 @@
|
||||
from contextlib import ContextDecorator
|
||||
from datetime import datetime as datetime, time, timedelta as timedelta, tzinfo as tzinfo
|
||||
from datetime import date, datetime as datetime, time, timedelta as timedelta, tzinfo as tzinfo
|
||||
from typing import Optional, Union
|
||||
|
||||
_AnyTime = Union[time, datetime]
|
||||
@@ -45,6 +45,7 @@ class override(ContextDecorator):
|
||||
def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None: ...
|
||||
|
||||
def localtime(value: _AnyTime, timezone: Optional[tzinfo] = None) -> datetime: ...
|
||||
def localdate(value: _AnyTime, timezone: Optional[tzinfo] = None) -> date: ...
|
||||
def now() -> datetime: ...
|
||||
def is_aware(value: _AnyTime) -> bool: ...
|
||||
def is_naive(value: _AnyTime) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user