This commit is contained in:
sylvestre
2022-10-24 04:41:24 +00:00
parent 591bc10374
commit 004826a978
4 changed files with 20 additions and 14 deletions
+9 -6
View File
@@ -2026,18 +2026,18 @@ date [OPTION]... [MMDDhhmm[[CC]YY][.ss]]
</dl>
<h2 id="examples-16"><a class="header" href="#examples-16">Examples</a></h2>
<p>Display the current date using the default locale's format:</p>
<pre><code class="language-shell">date +&quot;%c&quot;
<pre><code class="language-shell">date +%c
</code></pre>
<p>Display the current date in UTC and ISO 8601 format:</p>
<pre><code class="language-shell">date -u +&quot;%Y-%m-%dT%H:%M:%SZ&quot;
<p>Display the current date in UTC, using the ISO 8601 format:</p>
<pre><code class="language-shell">date -u +%Y-%m-%dT%H:%M:%SZ
</code></pre>
<p>Display the current date as a Unix timestamp (seconds since the Unix epoch):</p>
<pre><code class="language-shell">date +%s
</code></pre>
<p>Display a specific date (represented as a Unix timestamp) using the default format:</p>
<pre><code class="language-shell">date -d @1473305798
<p>Convert a date specified as a Unix timestamp to the default format:</p>
<pre><code class="language-shell">date -d @{{1473305798}}
</code></pre>
<p>Convert a specific date to the Unix timestamp format:</p>
<p>Convert a given date to the Unix timestamp format:</p>
<pre><code class="language-shell">date -d &quot;{{2018-09-01 00:00}}&quot; +%s --utc
</code></pre>
<p>Display the current date using the RFC-3339 format (<code>YYYY-MM-DD hh:mm:ss TZ</code>):</p>
@@ -2046,6 +2046,9 @@ date [OPTION]... [MMDDhhmm[[CC]YY][.ss]]
<p>Set the current date using the format <code>MMDDhhmmYYYY.ss</code> (<code>YYYY</code> and <code>.ss</code> are optional):</p>
<pre><code class="language-shell">date {{093023592021.59}}
</code></pre>
<p>Display the current ISO week number:</p>
<pre><code class="language-shell">date +%V
</code></pre>
<blockquote>
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+9 -6
View File
@@ -232,18 +232,18 @@ date [OPTION]... [MMDDhhmm[[CC]YY][.ss]]
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Display the current date using the default locale's format:</p>
<pre><code class="language-shell">date +&quot;%c&quot;
<pre><code class="language-shell">date +%c
</code></pre>
<p>Display the current date in UTC and ISO 8601 format:</p>
<pre><code class="language-shell">date -u +&quot;%Y-%m-%dT%H:%M:%SZ&quot;
<p>Display the current date in UTC, using the ISO 8601 format:</p>
<pre><code class="language-shell">date -u +%Y-%m-%dT%H:%M:%SZ
</code></pre>
<p>Display the current date as a Unix timestamp (seconds since the Unix epoch):</p>
<pre><code class="language-shell">date +%s
</code></pre>
<p>Display a specific date (represented as a Unix timestamp) using the default format:</p>
<pre><code class="language-shell">date -d @1473305798
<p>Convert a date specified as a Unix timestamp to the default format:</p>
<pre><code class="language-shell">date -d @{{1473305798}}
</code></pre>
<p>Convert a specific date to the Unix timestamp format:</p>
<p>Convert a given date to the Unix timestamp format:</p>
<pre><code class="language-shell">date -d &quot;{{2018-09-01 00:00}}&quot; +%s --utc
</code></pre>
<p>Display the current date using the RFC-3339 format (<code>YYYY-MM-DD hh:mm:ss TZ</code>):</p>
@@ -252,6 +252,9 @@ date [OPTION]... [MMDDhhmm[[CC]YY][.ss]]
<p>Set the current date using the format <code>MMDDhhmmYYYY.ss</code> (<code>YYYY</code> and <code>.ss</code> are optional):</p>
<pre><code class="language-shell">date {{093023592021.59}}
</code></pre>
<p>Display the current ISO week number:</p>
<pre><code class="language-shell">date +%V
</code></pre>
<blockquote>
<p>The examples are provided by the <a href="https://tldr.sh">tldr-pages project</a> under the <a href="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md">CC BY 4.0 License</a>.</p>
<p>Please note that, as uutils is a work in progress, some examples might fail.</p>