From 4ed651c6b5e6075414ede49025419e4c74b80210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 4 Jan 2021 09:57:37 +0100 Subject: [PATCH] Datetime --- README.md | 8 ++++---- index.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index cf88765..4f61afc 100644 --- a/README.md +++ b/README.md @@ -623,8 +623,8 @@ from dateutil.tz import UTC, tzlocal, gettz, resolve_imaginary = D/T/DT.fromisoformat('') # Object from ISO string. Raises ValueError.
= DT.strptime(, '') # Datetime from str, according to format. = D/DT.fromordinal() # D/DTn from days since Christ, at midnight. - = DT.fromtimestamp() # Local time DTn from seconds since Epoch. - = DT.fromtimestamp(, ) # Aware datetime from seconds since Epoch. + = DT.fromtimestamp() # Local time DTn from seconds since the Epoch. + = DT.fromtimestamp(, ) # Aware datetime from seconds since the Epoch. ``` * **ISO strings come in following forms: `'YYYY-MM-DD'`, `'HH:MM:SS.ffffff[±]'`, or both separated by an arbitrary character. Offset is formatted as: `'HH:MM'`.** * **Epoch on Unix systems is: `'1970-01-01 00:00 UTC'`, `'1970-01-01 01:00 CET'`, ...** @@ -634,8 +634,8 @@ from dateutil.tz import UTC, tzlocal, gettz, resolve_imaginary = .isoformat(sep='T') # Also timespec='auto/hours/minutes/seconds'. = .strftime('') # Custom string representation. = .toordinal() # Days since Christ, ignoring time and tz. - = .timestamp() # Seconds since Epoch, from DTn in local tz. - = .timestamp() # Seconds since Epoch, from DTa. + = .timestamp() # Seconds since the Epoch, from DTn in local tz. + = .timestamp() # Seconds since the Epoch, from DTa. ``` ### Format diff --git a/index.html b/index.html index 5b6f4fc..c71e341 100644 --- a/index.html +++ b/index.html @@ -701,8 +701,8 @@ shuffle(<list>)

Encode

<D/T/DT> = D/T/DT.fromisoformat('<iso>')    # Object from ISO string. Raises ValueError.
 <DT>     = DT.strptime(<str>, '<format>')   # Datetime from str, according to format.
 <D/DTn>  = D/DT.fromordinal(<int>)          # D/DTn from days since Christ, at midnight.
-<DTn>    = DT.fromtimestamp(<real>)         # Local time DTn from seconds since Epoch.
-<DTa>    = DT.fromtimestamp(<real>, <tz.>)  # Aware datetime from seconds since Epoch.
+<DTn>    = DT.fromtimestamp(<real>)         # Local time DTn from seconds since the Epoch.
+<DTa>    = DT.fromtimestamp(<real>, <tz.>)  # Aware datetime from seconds since the Epoch.
 
    @@ -712,8 +712,8 @@ shuffle(<list>)

    Decode

    <str>    = <D/T/DT>.isoformat(sep='T')      # Also timespec='auto/hours/minutes/seconds'.
     <str>    = <D/T/DT>.strftime('<format>')    # Custom string representation.
     <int>    = <D/DT>.toordinal()               # Days since Christ, ignoring time and tz.
    -<float>  = <DTn>.timestamp()                # Seconds since Epoch, from DTn in local tz.
    -<float>  = <DTa>.timestamp()                # Seconds since Epoch, from DTa.
    +<float>  = <DTn>.timestamp()                # Seconds since the Epoch, from DTn in local tz.
    +<float>  = <DTa>.timestamp()                # Seconds since the Epoch, from DTa.
     

    Format

    >>> from datetime import datetime