Sat Oct 11 16:45:58 2014 UTC ()
Pull up following revision(s) (requested by apb in ticket #135):
	lib/libutil/parsedate.3: revision 1.13
Document that years in ISO 8601 dates are taken literally.
"69-09-10" is in the year 69, not 2069.


(snj)
diff -r1.12 -r1.12.8.1 src/lib/libutil/parsedate.3

cvs diff -r1.12 -r1.12.8.1 src/lib/libutil/parsedate.3 (expand / switch to unified diff)

--- src/lib/libutil/parsedate.3 2013/01/19 15:28:25 1.12
+++ src/lib/libutil/parsedate.3 2014/10/11 16:45:58 1.12.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: parsedate.3,v 1.12 2013/01/19 15:28:25 apb Exp $ 1.\" $NetBSD: parsedate.3,v 1.12.8.1 2014/10/11 16:45:58 snj Exp $
2.\" 2.\"
3.\" Copyright (c) 2006 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2006 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Christos Zoulas. 7.\" by Christos Zoulas.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd January 19, 2013 30.Dd October 7, 2014
31.Dt PARSEDATE 3 31.Dt PARSEDATE 3
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm parsedate 34.Nm parsedate
35.Nd date parsing function 35.Nd date parsing function
36.Sh LIBRARY 36.Sh LIBRARY
37.Lb libutil 37.Lb libutil
38.Sh SYNOPSIS 38.Sh SYNOPSIS
39.In util.h 39.In util.h
40.Ft time_t 40.Ft time_t
41.Fn parsedate "const char *datestr" "const time_t *time" "const int *tzoff" 41.Fn parsedate "const char *datestr" "const time_t *time" "const int *tzoff"
42.Sh DESCRIPTION 42.Sh DESCRIPTION
43The 43The
@@ -188,39 +188,43 @@ Timezone names: @@ -188,39 +188,43 @@ Timezone names:
188.Dv wadt , 188.Dv wadt ,
189.Dv cct , 189.Dv cct ,
190.Dv jst , 190.Dv jst ,
191.Dv east , 191.Dv east ,
192.Dv eadt , 192.Dv eadt ,
193.Dv gst , 193.Dv gst ,
194.Dv nzt , 194.Dv nzt ,
195.Dv nzst , 195.Dv nzst ,
196.Dv nzdt , 196.Dv nzdt ,
197.Dv idle . 197.Dv idle .
198.Pp 198.Pp
199A variety of unambiguous dates are recognized: 199A variety of unambiguous dates are recognized:
200.Bl -tag -compact -width "20 Jun 1994" 200.Bl -tag -compact -width "20 Jun 1994"
201.It 69-09-10 201.It 9/10/69
202For years between 69-99 we assume 1900+ and for years between 0-68 202For years between 69-99 we assume 1900+ and for years between 0-68
203we assume 2000+. 203we assume 2000+.
204.It 2006-11-17 204.It 2006-11-17
205An ISO-8601 date. 205An ISO-8601 date.
 206.It 69-09-10
 207The year in an ISO-8601 date is always taken literally,
 208so this is the year 69, not 2069.
206.It 10/1/2000 209.It 10/1/2000
207October 10, 2000; the common US format. 210October 10, 2000; the common US format.
208.It 20 Jun 1994 211.It 20 Jun 1994
209.It 23jun2001 212.It 23jun2001
210.It 1-sep-06 213.It 1-sep-06
211Other common abbreviations. 214Other common abbreviations.
212.It 1/11 215.It 1/11
213the year can be omitted 216The year can be omitted.
 217This is the US month/day format.
214.El 218.El
215.Pp 219.Pp
216As well as times: 220As well as times:
217.Bl -tag -compact -width 12:11:01.000012 221.Bl -tag -compact -width 12:11:01.000012
218.It 10:01 222.It 10:01
219.It 10:12pm 223.It 10:12pm
220.It 12:11:01.000012 224.It 12:11:01.000012
221.It 12:21-0500 225.It 12:21-0500
222.El 226.El
223.Pp 227.Pp
224Relative items are also supported: 228Relative items are also supported:
225.Bl -tag -compact -width "this thursday" 229.Bl -tag -compact -width "this thursday"
226.It -1 month 230.It -1 month