File: dateformat.pyi

package info (click to toggle)
python-django-stubs 5.2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,832 kB
  • sloc: python: 5,185; makefile: 15; sh: 8
file content (64 lines) | stat: -rw-r--r-- 2,005 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from datetime import date, tzinfo
from datetime import datetime as builtin_datetime
from datetime import time as builtin_time
from re import Pattern
from typing import Any, Literal

re_formatchars: Pattern[str]
re_escaped: Pattern[str]

class Formatter:
    def format(self, formatstr: str) -> str: ...

class TimeFormat(Formatter):
    data: builtin_datetime | builtin_time
    timezone: tzinfo | None
    def __init__(self, obj: builtin_datetime | builtin_time) -> None: ...
    def a(self) -> str: ...
    def A(self) -> str: ...
    def e(self) -> str: ...
    def f(self) -> int | str: ...
    def g(self) -> int: ...
    def G(self) -> int: ...
    def h(self) -> str: ...
    def H(self) -> str: ...
    def i(self) -> str: ...
    def O(self) -> str: ...
    def P(self) -> str: ...
    def s(self) -> str: ...
    def T(self) -> str: ...
    def u(self) -> str: ...
    def Z(self) -> int | Literal[""]: ...

class DateFormat(TimeFormat):
    data: builtin_datetime | date | builtin_time  # type: ignore[assignment]
    timezone: tzinfo | None
    year_days: Any
    def __init__(self, obj: builtin_datetime | builtin_time | date) -> None: ...
    def b(self) -> str: ...
    def c(self) -> str: ...
    def d(self) -> str: ...
    def D(self) -> str: ...
    def E(self) -> str: ...
    def F(self) -> str: ...
    def I(self) -> str: ...
    def j(self) -> int: ...
    def l(self) -> str: ...
    def L(self) -> bool: ...
    def m(self) -> str: ...
    def M(self) -> str: ...
    def n(self) -> int: ...
    def N(self) -> str: ...
    def o(self) -> int: ...
    def r(self) -> str: ...
    def S(self) -> str: ...
    def t(self) -> str: ...
    def U(self) -> int: ...
    def w(self) -> int: ...
    def W(self) -> int: ...
    def y(self) -> str: ...
    def Y(self) -> int: ...
    def z(self) -> int: ...

def format(value: builtin_datetime | date | builtin_time, format_string: str) -> str: ...
def time_format(value: builtin_datetime | builtin_time, format_string: str) -> str: ...