MCPcopy Create free account
hub / github.com/coreutils/coreutils / usage

Function usage

src/date.c:116–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114#endif
115
116void
117usage (int status)
118{
119 if (status != EXIT_SUCCESS)
120 emit_try_help ();
121 else
122 {
123 printf (_("\
124Usage: %s [OPTION]... [+FORMAT]\n\
125 or: %s [OPTION]... MMDDhhmm[[CC]YY][.ss]\n\
126"),
127 program_name, program_name);
128 fputs (_("\
129Display date and time in the given FORMAT.\n\
130With -s, or with MMDDhhmm[[CC]YY][.ss], set the date and time first.\n\
131"), stdout);
132
133 emit_mandatory_arg_note ();
134
135 oputs (_("\
136 -d, --date=STRING\n\
137 display time described by STRING, not 'now'\n\
138"));
139 oputs (_("\
140 --debug\n\
141 annotate the parsed date,\n\
142 and warn about questionable usage to standard error\n\
143"));
144 oputs (_("\
145 -f, --file=DATEFILE\n\
146 like --date; once for each line of DATEFILE;\n\
147 if DATEFILE is -, read names from standard input\n\
148"));
149 oputs (_("\
150 -I[FMT], --iso-8601[=FMT]\n\
151 output date/time in ISO 8601 format.\n\
152 FMT='date' (default), 'hours', 'minutes', 'seconds', or 'ns'\n\
153 for date and time to the indicated precision.\n\
154 Example: 2006-08-14T02:34:56-06:00\n\
155"));
156 oputs (_("\
157 --resolution\n\
158 output the available resolution of timestamps.\n\
159 Example: 0.000000001\n\
160"));
161 oputs (_("\
162 -R, --rfc-email\n\
163 output date and time in RFC 5322 format.\n\
164 Example: Mon, 14 Aug 2006 02:34:56 +0000\n\
165"));
166 oputs (_("\
167 --rfc-3339=FMT\n\
168 output date/time in RFC 3339 format.\n\
169 FMT='date', 'seconds', or 'ns'\n\
170 for date and time to the indicated precision.\n\
171 Example: 2006-08-14 02:34:56-06:00\n\
172"));
173 oputs (_("\

Callers 1

mainFunction · 0.70

Calls 2

emit_mandatory_arg_noteFunction · 0.85
emit_ancillary_infoFunction · 0.85

Tested by

no test coverage detected