~ubuntu-branches/ubuntu/karmic/grace/karmic

« back to all changes in this revision

Viewing changes to doc/convcal.1

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-19 14:19:58 UTC
  • Revision ID: james.westby@ubuntu.com-20020319141958-5gxna6vo1ek3zjml
Tags: upstream-5.1.7
ImportĀ upstreamĀ versionĀ 5.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH CONVCAL 1 "August 11, 2001" grace "User's Manual"
 
2
.SH NAME
 
3
convcal \- convert dates to different formats
 
4
 
 
5
.SH SYNOPSIS
 
6
.B convcal
 
7
[\fIOPTIONS\fR] [\fIDATE\fR]
 
8
 
 
9
.SH DESCRIPTION
 
10
\fBconvcal\fR is part of the \fIgrace\fR software package, an application for
 
11
two-dimensional data visualization. \fBconvcal\fR converts dates from and to
 
12
various formats. The following date formats are supported (hour, minutes and
 
13
seconds are always optional):
 
14
 
 
15
.TP
 
16
.I iso
 
17
1999-12-31T23:59:59.999
 
18
.TP
 
19
.I european
 
20
31/12/1999 23:59:59.999 or 31/12/99 23:59:59.999
 
21
.TP
 
22
.I us
 
23
12/31/1999 23:59:59.999 or 12/31/99 23:59:59.999
 
24
.TP
 
25
.I days
 
26
123456.789
 
27
.TP
 
28
.I seconds
 
29
123456.789
 
30
 
 
31
.SH ""
 
32
The formats are tried in the following order : users's choice,
 
33
iso, european and us (there is no ambiguity between calendar
 
34
formats and numerical formats and therefore no order is specified
 
35
for them).
 
36
 
 
37
.SH USAGE
 
38
\fBconvcal\fR reads the dates either on the command line or in the
 
39
standard input if the command line contains no date.
 
40
 
 
41
The user's choice for the input format put one format before the other
 
42
ones in the trial list, this is mainly useful for US citizen which
 
43
would certainly prefer to have US format checked before european
 
44
format. The default user's choice (nohint) does nothing so the
 
45
following formats of the list are checked.
 
46
 
 
47
The separators between various fields can be any characters in the set:
 
48
" :/.-T". One or more spaces act as one separator, other characters
 
49
can not be repeated, the T separator is allowed only between date and
 
50
time, mainly for iso8601. So the string "1999-12 31:23-59" is allowed
 
51
(but not recommended).  The '-' character is used both as a
 
52
separator (it is traditionally used in iso8601 format) and as the
 
53
unary minus (for dates in the far past or for numerical
 
54
dates). When the year is between 0 and 99 and is written with two
 
55
or less digits, it is mapped to the era beginning at wrap year and
 
56
ending at wrap year + 99 as follows :
 
57
 
 
58
[wy ; 99] -> [ wrap_year ; 100*(1 + wrap_year/100) - 1 ]
 
59
 
 
60
[00 ; wy-1] -> [ 100*(1 + wrap_year/100) ; wrap_year + 99]
 
61
 
 
62
so for example if the wrap year is set to 1950 (which is the default
 
63
value), then the mapping is :
 
64
 
 
65
range [00 ; 49] is mapped to [2000 ; 2049]
 
66
 
 
67
range [50 ; 99] is mapped to [1950 ; 1999]
 
68
 
 
69
this is reasonably Y2K compliant and is consistent with current use.
 
70
Specifying year 1 is still possible using more than two digits as
 
71
follows : "0001-03-04" is unambiguously March the 4th, year 1, even
 
72
if the user's choice is us format. However using two digits only is
 
73
not recommended (we introduce a 2050 bug here so this feature
 
74
should be removed at some point in the future ;-)
 
75
 
 
76
Numerical dates (days and seconds formats) can be specified using
 
77
integer, real or exponential formats (the 'd' and 'D' exponant
 
78
markers from fortran are supported in addition to 'e' and 'E').
 
79
They are computed according to a customizable reference date.
 
80
The default value is given by the REFDATE constant in the source file.
 
81
You can change this value as you want before compiling, and you can
 
82
change it at will using the -r command line option. The default
 
83
value in the distributed file is "-4713-01-01T12:00:00", it is a
 
84
classical reference for astronomical events (note that the '-' is
 
85
used here both as a unary minus and as a separator).
 
86
 
 
87
The program can be used either for Denys's and gregorian
 
88
calendars. It does not take into account leap seconds : you can
 
89
think it works only in International Atomic Time (TAI) and not in
 
90
Coordinated Unified Time (UTC) ...  Inexistant dates are detected,
 
91
they include year 0, dates between 1582-10-05 and 1582-10-14,
 
92
February 29th of non leap years, months below 1 or above 12, ...
 
93
 
 
94
.SH OPTIONS
 
95
A summary of the options supported by \fBconvcal\fR is included below.
 
96
 
 
97
.TP
 
98
.B \-h
 
99
prints the help message on stderr and exits successfully
 
100
.TP
 
101
\fB\-i\fR \fIformat\fR
 
102
set user's choice for input format, supported formats are iso, european, us,
 
103
days, seconds and nohint.  At the beginning the input format is nohint, which
 
104
means the program try to guess the format by itself, if the user's choice does
 
105
not allow to parse the date, other formats are tried
 
106
.TP
 
107
\fB\-o\fR \fIformat\fR
 
108
force output format, supported formats are iso, european, us, days, seconds
 
109
and nohint.  At the beginning, the output format is nohint, which means the
 
110
program uses days format for dates read in any calendar format and uses
 
111
iso8601 for dates read in numerical format
 
112
.TP
 
113
\fB\-r\fR \fIdate\fR
 
114
set reference date (the date is read using the current input format) at the
 
115
beginning the reference is set according to the REFDATE constant in the code,
 
116
which is -4713-01-01T12:00:00 in the distributed file.
 
117
.TP
 
118
\fB\-w\fR \fIyear\fR
 
119
set the wrap year to year
 
120
 
 
121
.SH "SEE ALSO"
 
122
.BR grace(1)
 
123
 
 
124
.I http://plasma-gate.weizmann.ac.il/Grace/
 
125
 
 
126
.SH AUTHOR
 
127
Luc Maisonobe
 
128
 
 
129
This man-page was written by Jan Schaumann <jschauma@netmeister.org> as part of "The Missing
 
130
Man Pages Project".  Please see \fIhttp://www.netmeister.org/misc/m2p2/index.html\fR
 
131
for details.