Skip to content

dateutil first version #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
52 changes: 52 additions & 0 deletions third_party/3/dateutil/parser.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from typing import List, Tuple, Optional, Callable, Union, IO, Any
from datetime import datetime

__all__ = ... # type: List[str]


class parserinfo(object):
JUMP = ... # type: List[str]
WEEKDAYS = ... # type: List[Tuple[str, str]]
MONTHS = ... # type: List[Tuple[str, str]]
HMS = ... # type: List[Tuple[str, str, str]]
AMPM = ... # type: List[Tuple[str, str, str]]
UTCZONE = ... # type: List[str]
PERTAIN = ... # type: List[str]
TZOFFSET = ... # type: Dict[str, int]

def __init__(self, dayfirst: bool=..., yearfirst: bool=...) -> None: ...
def jump(self, name: str) -> bool: ...
def weekday(self, name: str) -> str: ...
def month(self, name: str) -> str: ...
def hms(self, name: str) -> str: ...
def ampm(self, name: str) -> str: ...
def pertain(self, name: str) -> bool: ...
def utczone(self, name: str) -> bool: ...
def tzoffset(self, name: str) -> int: ...
def convertyear(self, year: int) -> int: ...
def validate(self, year: datetime) -> bool: ...


class parser(object):
def __init__(self, info: parserinfo=...) -> None: ...

def parse(
self,
timestr: Union[str, bytes, IO[Any]],
default: Optional[datetime],
ignoretz: bool=...,
tzinfos =...,
) -> datetime: ...

DEFAULTPARSER = ... # type: parser


def parse(timestr, parserinfo: parserinfo=..., **kwargs) -> datetime:
...


class _tzparser(object):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this class not have any behavior?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_tzparser has behavior, but as far as I know it's exclusively used in tzstr for parsing a string to a _tzparser._result object.

...


DEFAULTTZPARSER = ... # type: _tzparser