From dc085f8b0ea7c1c70855abf446063d7a8148eb1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 9 Sep 2023 01:00:17 +0200 Subject: [PATCH] Numbers, Datetime --- README.md | 6 +++--- index.html | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 52bddf4..434d693 100644 --- a/README.md +++ b/README.md @@ -488,7 +488,7 @@ Numbers ```python = int() # Or: math.floor() = float() # Or: - = complex(real=0, imag=0) # Or: ± j + = complex(real=0, imag=0) # Or: ± j = fractions.Fraction(0, 1) # Or: Fraction(numerator=0, denominator=1) = decimal.Decimal() # Or: Decimal((sign, digits, exponent)) ``` @@ -645,8 +645,8 @@ from dateutil.tz import tzlocal, gettz ### Format ```python >>> dt = datetime.strptime('2025-08-14 23:39:00.00 +0200', '%Y-%m-%d %H:%M:%S.%f %z') ->>> dt.strftime("%dth of %B '%y (%a), %I:%M%p %Z") -"14th of August '25 (Thu), 11:39PM UTC+02:00" +>>> dt.strftime("%dth of %B '%y (%a), %I:%M %p %Z") +"14th of August '25 (Thu), 11:39 PM UTC+02:00" ``` * **`'%z'` accepts `'±HH[:]MM'` and returns `'±HHMM'` or empty string if datetime is naive.** * **`'%Z'` accepts `'UTC/GMT'` and local timezone's code and returns timezone's name, `'UTC[±HH:MM]'` if timezone is nameless, or an empty string if datetime is naive.** diff --git a/index.html b/index.html index 76ecdd1..3392873 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -446,7 +446,7 @@ Point(x=1, y=2

#Numbers

<int>      = int(<float/str/bool>)                # Or: math.floor(<float>)
 <float>    = float(<int/str/bool>)                # Or: <int/float>e±<int>
-<complex>  = complex(real=0, imag=0)              # Or: <int/float/Fraction> ± <int/float>j
+<complex>  = complex(real=0, imag=0)              # Or: <int/float> ± <int/float>j
 <Fraction> = fractions.Fraction(0, 1)             # Or: Fraction(numerator=0, denominator=1)
 <Decimal>  = decimal.Decimal(<str/int>)           # Or: Decimal((sign, digits, exponent))
 
@@ -570,8 +570,8 @@ Point(x=1, y=2

Format

>>> dt = datetime.strptime('2025-08-14 23:39:00.00 +0200', '%Y-%m-%d %H:%M:%S.%f %z')
->>> dt.strftime("%dth of %B '%y (%a), %I:%M%p %Z")
-"14th of August '25 (Thu), 11:39PM UTC+02:00"
+>>> dt.strftime("%dth of %B '%y (%a), %I:%M %p %Z")
+"14th of August '25 (Thu), 11:39 PM UTC+02:00"
 
    @@ -2928,7 +2928,7 @@ $ deactivate # Deactivates the activ