You've already forked uutils.github.io
mirror of
https://github.com/uutils/uutils.github.io.git
synced 2026-06-10 16:12:28 -07:00
deploy: c249eba195
This commit is contained in:
+9
-6
@@ -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 +"%c"
|
||||
<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 +"%Y-%m-%dT%H:%M:%SZ"
|
||||
<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 "{{2018-09-01 00:00}}" +%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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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 +"%c"
|
||||
<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 +"%Y-%m-%dT%H:%M:%SZ"
|
||||
<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 "{{2018-09-01 00:00}}" +%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>
|
||||
|
||||
Reference in New Issue
Block a user