Skip to content

Commit 6d5dfc6

Browse files
committed
Datetime, Enum
1 parent 40b1a87 commit 6d5dfc6

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ from dateutil.tz import UTC, tzlocal, gettz
586586
### Timezone
587587
```python
588588
<tzinfo> = UTC # UTC timezone. London without DST.
589-
<tzinfo> = tzlocal() # Local timezone.
589+
<tzinfo> = tzlocal() # Local timezone. Also gettz().
590590
<tzinfo> = gettz('<Cont.>/<City>') # Timezone from 'Continent/City_Name' str.
591591
```
592592

@@ -1177,6 +1177,9 @@ class <enum_name>(Enum):
11771177
def get_member_names(cls):
11781178
return [a.name for a in cls.__members__.values()]
11791179
```
1180+
* **If there are no numeric values before auto(), it returns 1.**
1181+
* **Otherwise it returns an increment of last numeric value.**
1182+
11801183

11811184
```python
11821185
<member> = <enum>.<member_name>

index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ <h3 id="now">Now</h3>
624624
</ul>
625625
<h3 id="timezone">Timezone</h3>
626626
<pre><code class="python language-python hljs">&lt;tzinfo&gt; = UTC <span class="hljs-comment"># UTC timezone. London without DST.</span>
627-
&lt;tzinfo&gt; = tzlocal() <span class="hljs-comment"># Local timezone.</span>
627+
&lt;tzinfo&gt; = tzlocal() <span class="hljs-comment"># Local timezone. Also gettz().</span>
628628
&lt;tzinfo&gt; = gettz(<span class="hljs-string">'&lt;Cont.&gt;/&lt;City&gt;'</span>) <span class="hljs-comment"># Timezone from 'Continent/City_Name' str.</span>
629629
</code></pre>
630630
<pre><code class="python language-python apache hljs">&lt;DTa&gt; = &lt;DT&gt;.astimezone(&lt;tzinfo&gt;) <span class="hljs-comment"># Datetime, converted to passed timezone.</span>
@@ -1090,6 +1090,10 @@ <h2 id="enum"><a href="#enum" name="enum">#</a>Enum</h2>
10901090
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_member_names</span><span class="hljs-params">(cls)</span>:</span>
10911091
<span class="hljs-keyword">return</span> [a.name <span class="hljs-keyword">for</span> a <span class="hljs-keyword">in</span> cls.__members__.values()]
10921092
</code></pre>
1093+
<ul>
1094+
<li><strong>If there are no numeric values before auto(), it returns 1.</strong></li>
1095+
<li><strong>Otherwise it returns an increment of last numeric value.</strong></li>
1096+
</ul>
10931097
<pre><code class="python language-python hljs">&lt;member&gt; = &lt;enum&gt;.&lt;member_name&gt;
10941098
&lt;member&gt; = &lt;enum&gt;[<span class="hljs-string">'&lt;member_name&gt;'</span>]
10951099
&lt;member&gt; = &lt;enum&gt;(&lt;value&gt;)

0 commit comments

Comments
 (0)