From c8e884458af1d7783ca5b6e4cc5a0a9d599294b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 21 Jan 2020 01:22:12 +0100 Subject: [PATCH] Numbers, datetime --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 46c799d..1bcccc4 100644 --- a/README.md +++ b/README.md @@ -526,7 +526,7 @@ shuffle() = 0b # Or: 0x = int('', 2) # Or: int('', 16) = int('0b', 0) # Or: int('0x', 0) -'0b' = bin() # Or: '0x' = hex() +'0b' = bin() # Or: hex() ``` ### Bitwise Operators @@ -630,7 +630,7 @@ from dateutil.tz import UTC, tzlocal, gettz, resolve_imaginary = DT.fromtimestamp(, ) # Aware datetime from seconds since 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'`.** -* **On Unix systems Epoch is: `'1970-01-01 00:00 UTC'`, `'1970-01-01 01:00 CET'`, ...** +* **Epoch on Unix systems is: `'1970-01-01 00:00 UTC'`, `'1970-01-01 01:00 CET'`, ...** ### Decode ```python diff --git a/index.html b/index.html index fc93690..1c5fec5 100644 --- a/index.html +++ b/index.html @@ -598,7 +598,7 @@ shuffle(<list>)

Bin, Hex

<int>     = 0b<bin>                   # Or: 0x<hex>
 <int>     = int('<bin>', 2)           # Or: int('<hex>', 16)
 <int>     = int('0b<bin>', 0)         # Or: int('0x<hex>', 0)
-'0b<bin>' = bin(<int>)                # Or: '0x<hex>' = hex(<int>)
+'0b<bin>' = bin(<int>)                # Or: hex(<int>)
 

Bitwise Operators

<int>     = <int> & <int>             # And
@@ -682,7 +682,7 @@ shuffle(<list>)
 
 
  • ISO strings come in following forms: 'YYYY-MM-DD', 'HH:MM:SS.ffffff[±<offset>]', or both separated by an arbitrary character. Offset is formatted as: 'HH:MM'.
  • -
  • On Unix systems Epoch is: '1970-01-01 00:00 UTC', '1970-01-01 01:00 CET', …
  • +
  • Epoch on Unix systems is: '1970-01-01 00:00 UTC', '1970-01-01 01:00 CET', …

Decode

<str>    = <D/T/DT>.isoformat(sep='T')      # Also timespec='auto/hours/minutes/seconds'.
 <str>    = <D/T/DT>.strftime('<format>')    # Custom string representation.