This file is indexed.

/usr/share/doc/mailutils-doc/mailutils.html/Relative-items-in-date-strings.html is in mailutils-doc 1:2.99.99-1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Published by the Free Software Foundation,
51 Franklin Street, Fifth Floor
Boston, MA 02110-1301, USA

Copyright (C) 1999-2004, 2008-2012, 2014-2015 Free Software
Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover, and no Back-Cover texts.
A copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>GNU Mailutils Manual: Relative items in date strings</title>

<meta name="description" content="GNU Mailutils Manual: Relative items in date strings">
<meta name="keywords" content="GNU Mailutils Manual: Relative items in date strings">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Function-Index.html#Function-Index" rel="index" title="Function Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Date-Input-Formats.html#Date-Input-Formats" rel="up" title="Date Input Formats">
<link href="Pure-numbers-in-date-strings.html#Pure-numbers-in-date-strings" rel="next" title="Pure numbers in date strings">
<link href="Day-of-week-items.html#Day-of-week-items" rel="prev" title="Day of week items">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<a name="Relative-items-in-date-strings"></a>
<div class="header">
<p>
Next: <a href="Pure-numbers-in-date-strings.html#Pure-numbers-in-date-strings" accesskey="n" rel="next">Pure numbers in date strings</a>, Previous: <a href="Day-of-week-items.html#Day-of-week-items" accesskey="p" rel="prev">Day of week items</a>, Up: <a href="Date-Input-Formats.html#Date-Input-Formats" accesskey="u" rel="up">Date Input Formats</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Function-Index.html#Function-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Relative-items-in-date-strings-1"></a>
<h3 class="section">B.6 Relative items in date strings</h3>

<a name="index-relative-items-in-date-strings"></a>
<a name="index-displacement-of-dates"></a>

<p><em>Relative items</em> adjust a date (or the current date if none) forward
or backward.  The effects of relative items accumulate.  Here are some
examples:
</p>
<div class="example">
<pre class="example">1 year
1 year ago
3 years
2 days
</pre></div>

<a name="index-year-in-date-strings"></a>
<a name="index-month-in-date-strings"></a>
<a name="index-fortnight-in-date-strings"></a>
<a name="index-week-in-date-strings"></a>
<a name="index-day-in-date-strings"></a>
<a name="index-hour-in-date-strings"></a>
<a name="index-minute-in-date-strings"></a>
<p>The unit of time displacement may be selected by the string &lsquo;<samp>year</samp>&rsquo;
or &lsquo;<samp>month</samp>&rsquo; for moving by whole years or months.  These are fuzzy
units, as years and months are not all of equal duration.  More precise
units are &lsquo;<samp>fortnight</samp>&rsquo; which is worth 14 days, &lsquo;<samp>week</samp>&rsquo; worth 7
days, &lsquo;<samp>day</samp>&rsquo; worth 24 hours, &lsquo;<samp>hour</samp>&rsquo; worth 60 minutes,
&lsquo;<samp>minute</samp>&rsquo; or &lsquo;<samp>min</samp>&rsquo; worth 60 seconds, and &lsquo;<samp>second</samp>&rsquo; or
&lsquo;<samp>sec</samp>&rsquo; worth one second.  An &lsquo;<samp>s</samp>&rsquo; suffix on these units is
accepted and ignored.
</p>
<a name="index-ago-in-date-strings"></a>
<p>The unit of time may be preceded by a multiplier, given as an optionally
signed number.  Unsigned numbers are taken as positively signed.  No
number at all implies 1 for a multiplier.  Following a relative item by
the string &lsquo;<samp>ago</samp>&rsquo; is equivalent to preceding the unit by a
multiplier with value <em>-1</em>.
</p>
<a name="index-day-in-date-strings-1"></a>
<a name="index-tomorrow-in-date-strings"></a>
<a name="index-yesterday-in-date-strings"></a>
<p>The string &lsquo;<samp>tomorrow</samp>&rsquo; is worth one day in the future (equivalent
to &lsquo;<samp>day</samp>&rsquo;), the string &lsquo;<samp>yesterday</samp>&rsquo; is worth
one day in the past (equivalent to &lsquo;<samp>day ago</samp>&rsquo;).
</p>
<a name="index-now-in-date-strings"></a>
<a name="index-today-in-date-strings"></a>
<a name="index-this-in-date-strings"></a>
<p>The strings &lsquo;<samp>now</samp>&rsquo; or &lsquo;<samp>today</samp>&rsquo; are relative items corresponding
to zero-valued time displacement, these strings come from the fact
a zero-valued time displacement represents the current time when not
otherwise changed by previous items.  They may be used to stress other
items, like in &lsquo;<samp>12:00 today</samp>&rsquo;.  The string &lsquo;<samp>this</samp>&rsquo; also has
the meaning of a zero-valued time displacement, but is preferred in
date strings like &lsquo;<samp>this thursday</samp>&rsquo;.
</p>
<p>When a relative item causes the resulting date to cross a boundary
where the clocks were adjusted, typically for daylight saving time,
the resulting date and time are adjusted accordingly.
</p>
<p>The fuzz in units can cause problems with relative items.  For
example, &lsquo;<samp>2003-07-31 -1 month</samp>&rsquo; might evaluate to 2003-07-01,
because 2003-06-31 is an invalid date.  To determine the previous
month more reliably, you can ask for the month before the 15th of the
current month.  For example:
</p>
<div class="example">
<pre class="example">$ date -R
Thu, 31 Jul 2003 13:02:39 -0700
$ date --date='-1 month' +'Last month was %B?'
Last month was July?
$ date --date=&quot;$(date +%Y-%m-15) -1 month&quot; +'Last month was %B!'
Last month was June!
</pre></div>

<p>Also, take care when manipulating dates around clock changes such as
daylight saving leaps.  In a few cases these have added or subtracted
as much as 24 hours from the clock, so it is often wise to adopt
universal time by setting the <code>TZ</code> environment variable to
&lsquo;<samp>UTC0</samp>&rsquo; before embarking on calendrical calculations.
</p>
<hr>
<div class="header">
<p>
Next: <a href="Pure-numbers-in-date-strings.html#Pure-numbers-in-date-strings" accesskey="n" rel="next">Pure numbers in date strings</a>, Previous: <a href="Day-of-week-items.html#Day-of-week-items" accesskey="p" rel="prev">Day of week items</a>, Up: <a href="Date-Input-Formats.html#Date-Input-Formats" accesskey="u" rel="up">Date Input Formats</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Function-Index.html#Function-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>