Skip to content

Commit 4ed651c

Browse files
committed
Datetime
1 parent b0f6591 commit 4ed651c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,8 @@ from dateutil.tz import UTC, tzlocal, gettz, resolve_imaginary
623623
<D/T/DT> = D/T/DT.fromisoformat('<iso>') # Object from ISO string. Raises ValueError.
624624
<DT> = DT.strptime(<str>, '<format>') # Datetime from str, according to format.
625625
<D/DTn> = D/DT.fromordinal(<int>) # D/DTn from days since Christ, at midnight.
626-
<DTn> = DT.fromtimestamp(<real>) # Local time DTn from seconds since Epoch.
627-
<DTa> = DT.fromtimestamp(<real>, <tz.>) # Aware datetime from seconds since Epoch.
626+
<DTn> = DT.fromtimestamp(<real>) # Local time DTn from seconds since the Epoch.
627+
<DTa> = DT.fromtimestamp(<real>, <tz.>) # Aware datetime from seconds since the Epoch.
628628
```
629629
* **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'`.**
630630
* **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
634634
<str> = <D/T/DT>.isoformat(sep='T') # Also timespec='auto/hours/minutes/seconds'.
635635
<str> = <D/T/DT>.strftime('<format>') # Custom string representation.
636636
<int> = <D/DT>.toordinal() # Days since Christ, ignoring time and tz.
637-
<float> = <DTn>.timestamp() # Seconds since Epoch, from DTn in local tz.
638-
<float> = <DTa>.timestamp() # Seconds since Epoch, from DTa.
637+
<float> = <DTn>.timestamp() # Seconds since the Epoch, from DTn in local tz.
638+
<float> = <DTa>.timestamp() # Seconds since the Epoch, from DTa.
639639
```
640640

641641
### Format

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,8 @@
701701
<div><h3 id="encode">Encode</h3><pre><code class="python language-python apache hljs">&lt;D/T/DT&gt; = D/T/DT.fromisoformat(<span class="hljs-string">'&lt;iso&gt;'</span>) <span class="hljs-comment"># Object from ISO string. Raises ValueError.</span>
702702
&lt;DT&gt; = DT.strptime(&lt;str&gt;, <span class="hljs-string">'&lt;format&gt;'</span>) <span class="hljs-comment"># Datetime from str, according to format.</span>
703703
&lt;D/DTn&gt; = D/DT.fromordinal(&lt;int&gt;) <span class="hljs-comment"># D/DTn from days since Christ, at midnight.</span>
704-
&lt;DTn&gt; = DT.fromtimestamp(&lt;real&gt;) <span class="hljs-comment"># Local time DTn from seconds since Epoch.</span>
705-
&lt;DTa&gt; = DT.fromtimestamp(&lt;real&gt;, &lt;tz.&gt;) <span class="hljs-comment"># Aware datetime from seconds since Epoch.</span>
704+
&lt;DTn&gt; = DT.fromtimestamp(&lt;real&gt;) <span class="hljs-comment"># Local time DTn from seconds since the Epoch.</span>
705+
&lt;DTa&gt; = DT.fromtimestamp(&lt;real&gt;, &lt;tz.&gt;) <span class="hljs-comment"># Aware datetime from seconds since the Epoch.</span>
706706
</code></pre></div>
707707

708708
<ul>
@@ -712,8 +712,8 @@
712712
<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>
713713
&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>
714714
&lt;int&gt; = &lt;D/DT&gt;.toordinal() <span class="hljs-comment"># Days since Christ, ignoring time and tz.</span>
715-
&lt;float&gt; = &lt;DTn&gt;.timestamp() <span class="hljs-comment"># Seconds since Epoch, from DTn in local tz.</span>
716-
&lt;float&gt; = &lt;DTa&gt;.timestamp() <span class="hljs-comment"># Seconds since Epoch, from DTa.</span>
715+
&lt;float&gt; = &lt;DTn&gt;.timestamp() <span class="hljs-comment"># Seconds since the Epoch, from DTn in local tz.</span>
716+
&lt;float&gt; = &lt;DTa&gt;.timestamp() <span class="hljs-comment"># Seconds since the Epoch, from DTa.</span>
717717
</code></pre></div>
718718

719719
<div><h3 id="format-1">Format</h3><pre><code class="python language-python hljs"><span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datetime <span class="hljs-keyword">import</span> datetime

0 commit comments

Comments
 (0)