chiark / gitweb /
man: document yearly and annually in systemd.time(7)
[elogind.git] / man / systemd.time.xml
index 1ff302f5cda29d71f9d19cdab4523773516a0f56..02431a5a1ebcb484d5adea5a69228b2a73bb8fc2 100644 (file)
         <refsect1>
                 <title>Description</title>
 
-                <para>In systemd timestamps, timespans, and calendar
+                <para>In systemd, timestamps, time spans, and calendar
                 events are displayed and may be specified in closely
                 related syntaxes.</para>
         </refsect1>
 
         <refsect1>
-                <title>Displaying Timespans</title>
+                <title>Displaying Time Spans</title>
 
-                <para>Timespans refer to time durations. On display
-                systemd will present timespans as a space separated
+                <para>Time spans refer to time durations. On display,
+                systemd will present time spans as a space-separated
                 series of time values each suffixed by a time
                 unit.</para>
 
         </refsect1>
 
         <refsect1>
-                <title>Parsing Timespans</title>
+                <title>Parsing Time Spans</title>
 
-                <para>When parsing systemd will accept the same
-                timespan syntax. Separating spaces may be omitted. The
+                <para>When parsing, systemd will accept the same
+                time span syntax. Separating spaces may be omitted. The
                 following time units are understood:</para>
 
                 <itemizedlist>
@@ -92,9 +92,9 @@
                 are assumed, but some exceptions exist and are marked
                 as such. In a few cases <literal>ns</literal>,
                 <literal>nsec</literal> is accepted too, where the
-                granularity of the timespan allows for this.</para>
+                granularity of the time span allows for this.</para>
 
-                <para>Examples for valid timespan specifications:</para>
+                <para>Examples for valid time span specifications:</para>
 
                 <programlisting>2 h
 2hours
                 <title>Displaying Timestamps</title>
 
                 <para>Timestamps refer to specific, unique points in
-                time. On display systemd will format these in the
+                time. On display, systemd will format these in the
                 local timezone as follows:</para>
 
                 <programlisting>Fri 2012-11-23 23:02:15 CET</programlisting>
 
-                <para>The week day is printed according to the locale
+                <para>The weekday is printed according to the locale
                 choice of the user.</para>
         </refsect1>
 
                 <para>When parsing systemd will accept a similar
                 timestamp syntax, but excluding any timezone
                 specification (this limitation might be removed
-                eventually). The week day specification is optional,
-                but when the week day is specified it must either be
+                eventually). The weekday specification is optional,
+                but when the weekday is specified it must either be
                 in the abbreviated (<literal>Wed</literal>) or
-                non-abbreviated (<literal>Wednesday</literal>) english
-                language form (case doesn't matter), and is not
+                non-abbreviated (<literal>Wednesday</literal>) English
+                language form (case does not matter), and is not
                 subject to the locale choice of the user. Either the
                 date, or the time part may be omitted, in which case
                 the current date or 00:00:00, resp., is assumed. The
                 specified in full or may be abbreviated (omitting the
                 century).</para>
 
-                <para>A timestamp is considered invalid if a week day
+                <para>A timestamp is considered invalid if a weekday
                 is specified and the date does not actually match the
                 specified day of the week.</para>
 
-                <para>When parsing systemd will also accept a few
+                <para>When parsing, systemd will also accept a few
                 special placeholders instead of timestamps:
                 <literal>now</literal> may be used to refer to the
                 current time (or of the invocation of the command
                 current day, the day before or the next day,
                 respectively.</para>
 
-                <para>When parsing systemd will also accept relative
-                time specifications. A timespan (see above) that is
+                <para>When parsing, systemd will also accept relative
+                time specifications. A time span (see above) that is
                 prefixed with <literal>+</literal> is evaluated to the
-                current time plus the specified
-                timespan. Correspondingly a timespan that is prefix
+                current time plus the specified time
+                span. Correspondingly, a time span that is prefixed
                 with <literal>-</literal> is evaluated to the current
-                time minus the specified timespan. Instead of
-                prefixing the timespan with <literal>-</literal> it
-                may also be suffixed with a space and the word
+                time minus the specified time span. Instead of
+                prefixing the time span with <literal>+</literal> or
+                <literal>-</literal>, it may also be suffixed with a
+                space and the word <literal>left</literal> or
                 <literal>ago</literal>.</para>
 
+                <para>Finally, a timespan prefixed with
+                <literal>@</literal> is evaluated relative to the UNIX
+                time epoch 1st Jan, 1970, 00:00.</para>
+
                 <para>Examples for valid timestamps and their
                 normalized form (assuming the current time was
                 2012-11-23 18:15:22):</para>
                tomorrow → Fri 2012-11-24 00:00:00
                +3h30min → Fri 2012-11-23 21:45:22
                     -5s → Fri 2012-11-23 18:15:17
-              11min ago → Fri 2012-11-23 18:04:22</programlisting>
+              11min ago → Fri 2012-11-23 18:04:22
+            @1395716396 → Tue 2014-03-25 03:59:56</programlisting>
 
                 <para>Note that timestamps printed by systemd will not
                 be parsed correctly by systemd, as the timezone
                 specification is not accepted, and printing timestamps
-                is subject to locale settings for the week day while
-                parsing only accepts english week day names.</para>
+                is subject to locale settings for the weekday while
+                parsing only accepts English weekday names.</para>
 
-                <para>In some cases systemd will display a relative
+                <para>In some cases, systemd will display a relative
                 timestamp (relative to the current time, or the time
                 of invocation of the command) instead or in addition
                 to an absolute timestamp as described above. A
 
                 <para>The above refers to 11:12:13 of the first or
                 fifth day of any month of the year 2012, given that it
-                is a thursday or friday.</para>
+                is a Thursday or Friday.</para>
 
                 <para>The weekday specification is optional. If
-                specified it should consist of one or more english
-                language week day names, either in the abbreviated
+                specified, it should consist of one or more English
+                language weekday names, either in the abbreviated
                 (Wed) or non-abbreviated (Wednesday) form (case does
-                not matter), separated by colons. Specifying two week
-                days separated by "-" refers to a range of continuous
-                week days. "," and "-" may be combined freely.</para>
-
-                <para>In the date and time specifications any
-                component may be specified as "*" in which case any
-                value will match. Alternatively, each component can be
-                specified as list of values separated by
-                colons. Values may also be suffixed with "/" and a
-                repetition value, which indicates that the value and
-                all values plus multiples of the repetition value are
-                matched.</para>
+                not matter), separated by commas. Specifying two
+                weekdays separated by <literal>-</literal> refers to a
+                range of continuous weekdays. <literal>,</literal> and
+                <literal>-</literal> may be combined freely.</para>
+
+                <para>In the date and time specifications, any
+                component may be specified as <literal>*</literal> in
+                which case any value will match. Alternatively, each
+                component can be specified as a list of values separated
+                by commas. Values may also be suffixed with
+                <literal>/</literal> and a repetition value, which
+                indicates that the value and all values plus multiples
+                of the repetition value are matched.</para>
 
                 <para>Either time or date specification may be
                 omitted, in which case the current day and 00:00:00 is
                 implied, respectively. If the second component is not
-                specified ":00" is assumed.</para>
+                specified, <literal>:00</literal> is assumed.</para>
 
                 <para>Timezone names may not be specified.</para>
 
                 <para>The special expressions
                 <literal>hourly</literal>, <literal>daily</literal>,
-                <literal>monthly</literal> and <literal>weekly</literal>
-                may be used as calendar events which refer to
-                <literal>*-*-* *:00:00</literal>, <literal>*-*-*
-                00:00:00</literal>, <literal>*-*-01 00:00:00</literal> and
-                <literal>Mon *-*-* 00:00:00</literal>,
-                respectively.</para>
+                <literal>monthly</literal>, <literal>weekly</literal>,
+                and <literal>yearly</literal> or
+                <literal>annually</literal> may be used as calendar
+                events which refer to
+                <literal>*-*-* *:00:00</literal>,
+                <literal>*-*-* 00:00:00</literal>,
+                <literal>*-*-01 00:00:00</literal>,
+                <literal>Mon *-*-* 00:00:00</literal>, and
+                <literal>*-01-01 00:00:00</literal> respectively.
+                </para>
 
                 <para>Examples for valid timestamps and their
                 normalized form:</para>
@@ -270,10 +281,12 @@ Wed-Sat,Tue 12-10-15 1:2:3 → Tue-Sat 2012-10-15 01:02:03
                      daily → *-*-* 00:00:00
                    monthly → *-*-01 00:00:00
                     weekly → Mon *-*-* 00:00:00
+                    yearly → *-01-01 00:00:00
+                  annually → *-01-01 00:00:00
                      *:2/3 → *-*-* *:02/3:00</programlisting>
 
                   <para>Calendar events are used by timer units, see
-                  <citerefentry><refentrytitle>systemdr.time</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                  <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                   for details.</para>
 
         </refsect1>
@@ -284,7 +297,8 @@ Wed-Sat,Tue 12-10-15 1:2:3 → Tue-Sat 2012-10-15 01:02:03
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                          <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                   </para>
         </refsect1>