1ckdate(1)                        User Commands                       ckdate(1)
2
3
4

NAME

6       ckdate, errdate, helpdate, valdate - prompts for and validates a date
7

SYNOPSIS

9       ckdate [-Q] [-W width] [-f format] [-d default] [-h help]
10            [-e error] [-p prompt] [-k pid [-s signal]]
11
12
13       /usr/sadm/bin/errdate [-W width] [-e error] [-f format]
14
15
16       /usr/sadm/bin/helpdate [-W width] [-h help] [-f format]
17
18
19       /usr/sadm/bin/valdate [-f format] input
20
21

DESCRIPTION

23       The  ckdate  utility  prompts  a  user  and  validates the response. It
24       defines, among other things, a prompt message whose response should  be
25       a  date,  text  for help and error messages, and a default value (which
26       will be returned if  the  user  responds  with  a   RETURN).  The  user
27       response must match the defined format for a date.
28
29
30       All  messages  are limited in length to 70 characters and are formatted
31       automatically. Any white space used in the definition  (including  new‐
32       line) is stripped. The -W option cancels the automatic formatting. When
33       a tilde is placed at the beginning or end of a message definition,  the
34       default  text will be inserted at that point, allowing both custom text
35       and the default text to be displayed.
36
37
38       If the prompt, help or error message is not defined, the  default  mes‐
39       sage (as defined under NOTES) will be displayed.
40
41
42       Three  visual  tool  modules are linked to the ckdate command. They are
43       errdate (which formats and displays an error message), helpdate  (which
44       formats  and  displays  a help message), and valdate (which validates a
45       response). These  modules  should  be  used  in  conjunction  with  FML
46       objects. In this instance, the FML object defines the prompt. When for‐
47       mat is defined in the errdate and helpdate modules, the  messages  will
48       describe the expected format.
49

OPTIONS

51       The following options are supported:
52
53       -d default    Defines  the  default  value as default. The default does
54                     not have to meet the format criteria.
55
56
57       -e error      Defines the error message as error.
58
59
60       -f format     Specifies the format against which the input will be ver‐
61                     ified. Possible formats and their definitions are:
62
63                     %b  =    abbreviated month name (jan, feb, mar)
64
65
66                     %B  =    full month name %d  = day of month (01 - 31)
67
68
69                     %D  =    date as %m/%d/%y (the default format)
70
71
72                     %e  =    day of month (1 - 31; single digits are preceded
73                              by a blank)
74
75
76                     %h  =    abbreviated month name, identical to %b%
77
78
79                     %m  =    month number (01 - 12)
80
81
82                     %y  =    year within century (for instance, 89)
83
84
85                     %Y  =    year as CCYY (for instance, 1989)
86
87
88
89       -h help       Defines the help messages as help.
90
91
92       -k pid        Specifies that process ID pid is to be sent a  signal  if
93                     the user chooses to abort.
94
95
96       -p prompt     Defines the prompt message as prompt.
97
98
99       -Q            Specifies  that  quit  will  not  be  allowed  as a valid
100                     response.
101
102
103       -s signal     Specifies that the process ID pid  defined  with  the  -k
104                     option   is to be sent signal signal when quit is chosen.
105                     If no signal is  specified, SIGTERM is used.
106
107
108       -W width      Specifies that prompt, help and error  messages  will  be
109                     formatted to a line length of width.
110
111

OPERANDS

113       The following operand is supported:
114
115       input    Input to be verified against format criteria.
116
117

EXIT STATUS

119       The following exit values are returned:
120
121       0    Successful execution.
122
123
124       1    EOF on input, or negative width on  -W option, or usage error.
125
126
127       3    User termination (quit).
128
129
130       4    Garbled format argument.
131
132

ATTRIBUTES

134       See attributes(5) for descriptions of the following attributes:
135
136
137
138
139       ┌─────────────────────────────┬─────────────────────────────┐
140       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
141       ├─────────────────────────────┼─────────────────────────────┤
142       │Availability                 │SUNWcsu                      │
143       └─────────────────────────────┴─────────────────────────────┘
144

SEE ALSO

146       attributes(5)
147

NOTES

149       The default prompt for ckdate is:
150
151         Enter the date [?,q]:
152
153
154
155
156       The default error message is:
157
158         ERROR - Please enter a date.  Format is <format>.
159
160
161
162
163       The default help message is:
164
165         Please enter a date. Format is <format>.
166
167
168
169
170       When  the quit option is chosen (and allowed), q is returned along with
171       the return code 3. The valdate module will not produce any  output.  It
172       returns zero for success and non-zero for failure.
173
174
175
176SunOS 5.11                        14 Sep 1992                        ckdate(1)
Impressum