Skip to content

Commit c8e8844

Browse files
committed
Numbers, datetime
1 parent 7301ca1 commit c8e8844

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ shuffle(<list>)
526526
<int> = 0b<bin> # Or: 0x<hex>
527527
<int> = int('<bin>', 2) # Or: int('<hex>', 16)
528528
<int> = int('0b<bin>', 0) # Or: int('0x<hex>', 0)
529-
'0b<bin>' = bin(<int>) # Or: '0x<hex>' = hex(<int>)
529+
'0b<bin>' = bin(<int>) # Or: hex(<int>)
530530
```
531531

532532
### Bitwise Operators
@@ -630,7 +630,7 @@ from dateutil.tz import UTC, tzlocal, gettz, resolve_imaginary
630630
<DTa> = DT.fromtimestamp(<real>, <tz.>) # Aware datetime from seconds since Epoch.
631631
```
632632
* **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'`.**
633-
* **On Unix systems Epoch is: `'1970-01-01 00:00 UTC'`, `'1970-01-01 01:00 CET'`, ...**
633+
* **Epoch on Unix systems is: `'1970-01-01 00:00 UTC'`, `'1970-01-01 01:00 CET'`, ...**
634634

635635
### Decode
636636
```python

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@
598598
<div><h3 id="binhex">Bin, Hex</h3><pre><code class="python language-python hljs">&lt;int&gt; = <span class="hljs-number">0</span>b&lt;bin&gt; <span class="hljs-comment"># Or: 0x&lt;hex&gt;</span>
599599
&lt;int&gt; = int(<span class="hljs-string">'&lt;bin&gt;'</span>, <span class="hljs-number">2</span>) <span class="hljs-comment"># Or: int('&lt;hex&gt;', 16)</span>
600600
&lt;int&gt; = int(<span class="hljs-string">'0b&lt;bin&gt;'</span>, <span class="hljs-number">0</span>) <span class="hljs-comment"># Or: int('0x&lt;hex&gt;', 0)</span>
601-
<span class="hljs-string">'0b&lt;bin&gt;'</span> = bin(&lt;int&gt;) <span class="hljs-comment"># Or: '0x&lt;hex&gt;' = hex(&lt;int&gt;)</span>
601+
<span class="hljs-string">'0b&lt;bin&gt;'</span> = bin(&lt;int&gt;) <span class="hljs-comment"># Or: hex(&lt;int&gt;)</span>
602602
</code></pre></div>
603603

604604
<div><h3 id="bitwiseoperators">Bitwise Operators</h3><pre><code class="python language-python hljs">&lt;int&gt; = &lt;int&gt; &amp; &lt;int&gt; <span class="hljs-comment"># And</span>
@@ -682,7 +682,7 @@
682682

683683
<ul>
684684
<li><strong>ISO strings come in following forms: <code class="python hljs"><span class="hljs-string">'YYYY-MM-DD'</span></code>, <code class="python hljs"><span class="hljs-string">'HH:MM:SS.ffffff[±&lt;offset&gt;]'</span></code>, or both separated by an arbitrary character. Offset is formatted as: <code class="python hljs"><span class="hljs-string">'HH:MM'</span></code>.</strong></li>
685-
<li><strong>On Unix systems Epoch is: <code class="python hljs"><span class="hljs-string">'1970-01-01 00:00 UTC'</span></code>, <code class="python hljs"><span class="hljs-string">'1970-01-01 01:00 CET'</span></code>, …</strong></li>
685+
<li><strong>Epoch on Unix systems is: <code class="python hljs"><span class="hljs-string">'1970-01-01 00:00 UTC'</span></code>, <code class="python hljs"><span class="hljs-string">'1970-01-01 01:00 CET'</span></code>, …</strong></li>
686686
</ul>
687687
<div><h3 id="decode">Decode</h3><pre><code class="python language-python hljs">&lt;str&gt; = &lt;D/T/DT&gt;.isoformat(sep=<span class="hljs-string">'T'</span>) <span class="hljs-comment"># Also timespec='auto/hours/minutes/seconds'.</span>
688688
&lt;str&gt; = &lt;D/T/DT&gt;.strftime(<span class="hljs-string">'&lt;format&gt;'</span>) <span class="hljs-comment"># Custom string representation.</span>

0 commit comments

Comments
 (0)