summaryrefslogtreecommitdiff
path: root/src/date.c
AgeCommit message (Collapse)Author
2007-08-22Don't include "getline.h".Jim Meyering
That file has just been removed from gnulib; its declarations are now in <stdio.h>. * src/md5sum.c: Likewise. * src/dircolors.c: Likewise.
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
2007-02-23* src/date.c (usage): Split a diagnostic that had grown to beJim Meyering
longer than the C89 maximum of 509 bytes.
2007-02-23* src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',Ed Santiago
for a separator. Include sample RFC 2822 and 3339 output.
2007-02-10Remove excess leading spaces that would make help2man misbehave.Jim Meyering
* src/printf.c (usage): Remove excess spaces on 2nd line of %b desc. * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc. * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc. * src/date.c (usage): Use two spaces after each optional flag, not one. Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
2006-11-27Improve the check for departures from C89, and fix the departuresPaul Eggert
I found. * Makefile.maint (my-distcheck): Also check for C89 compatibility as best we can with GCC. * src/stat.c (PRINTF_OPTION): Omit comma before } in enum declaration; C89 doesn't allow this. * src/dcgen: Don't generate string literals longer than what C89 requires support for. * src/cut.c (usage): Don't use string literals longer than what C89 requires support for. * src/date.c (usage): Likewise. * src/dd.c (usage): Likewise. * src/du.c (usage): Likewise. * src/ls.c (usage): Likewise. * src/od.c (usage): Likewise. * src/readlink.c (usage): Likewise. * src/seq.c (usage): Likewise. * src/shred.c (usage): Likewise.
2006-01-08(usage): Adjust the formatting of the entries forJim Meyering
%::z and %:::z (separate with two spaces, not one) so that help2man formats them properly. Reported by Philip Rowlands.
2006-01-03(usage): Explain %g, %G, and %V a bit better.Paul Eggert
2005-09-16(show_date): Correct comment: this function no longer handles aJim Meyering
NULL format string.
2005-09-16(show_date): Remove now-spurious braces.Jim Meyering
2005-09-16Include stat-time.h, and use its functions instead of the obsoletePaul Eggert
TIMESPEC_NS macro.
2005-09-16Include fprintftime.h.Jim Meyering
Don't include strftime.h or xanstrftime.h -- no longer needed. (show_date): Use fprintftime rather than xanstrftime.
2005-09-13(TIME_SPEC_DATE): No longer needs to be nonzero, soPaul Eggert
remove the "=1". (TIME_SOEC_HOURS, TIME_SPEC_MINUTES): Must be at end now, so put them there. (time_spec_string, time_spec): Hours and minutes must be at start now, so put them there. (rfc_2822_format): Now a string constant, not a boolean. All uses changed. (iso_8601_format, rfc_format): Remove. (RFC_3339_OPTION): New constant. (long_options): Add --rfc-3339. (usage): Add --rfc-3339. Don't mention --iso-8601. Mention %:z, %::z, %:::z. (main): Simplify calculation of 'format'; it was getting too hairy to follow. Add --rfc-3339. (show_date): Assume format arg is not NULL, which is the case now. The default code is moved to 'main'. This simplifies things and allows the default to be calculated just once.
2005-08-15Don't print uninitialized data (or anything else) to stdoutJim Meyering
upon localtime failure. (show_date): Remove stray `puts (buf);' (debugging?) from the 2004-02-02 change.
2005-08-02Include "xanstrftime.h".Jim Meyering
(show_date): Use xanstrftime instead of open-coding it.
2005-08-02(show_date): Remove now-unnecessary code thatJim Meyering
treated an empty format string as a special case.
2005-06-30Add uses of ARGMATCH_VERIFY to ensure thatJim Meyering
corresponding option string and value arrays are consistent.
2005-06-29(show_date): Use X2REALLOC rather than x2realloc.Jim Meyering
2005-06-28(show_date): Use x2realloc on 1-byte base types, not x2nrealloc.Jim Meyering
2005-06-23whoops: use puts, not fputsJim Meyering
2005-06-23(show_date): Use fputs rather than printf ("%s\n",.Jim Meyering
2005-06-16Don't embed `this'-style quotes in format strings.Jim Meyering
Rather than this: error (..., "...`%s'...", arg); do this: error (..., "...%s...", quote (arg));
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-12Assume `free (NULL)' works.Jim Meyering
2005-04-26Remove posixver.h and its uses.Paul Eggert
(COMMON_SHORT_OPTIONS): Remove. (short_options): New constant. (short_options, usage): -I now always takes an optional arg.
2005-03-28(time_spec_string): Use NULL, not `0'.Jim Meyering
2005-03-08(usage): Redo to match recent documentation changes.Paul Eggert
Don't bother documenting which usages are GNU extensions; the list wasn't correct, and is better left to the printed manual anyway.
2005-02-21(main): gettime now returns void.Paul Eggert
2004-09-21Remove unused "case 0".Paul Eggert
2004-08-03(show_date, rfc_format, batch_convert, main): Use bool for booleans.Paul Eggert
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-06-01(batch_convert): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.Jim Meyering
2004-03-17(enum Time_spec): New enum TIME_SPEC_NS.Jim Meyering
(time_spec_string, time_spec, show_date): Support it. (usage): Remove description of -ITIMESPEC, as it's obsolete and confusing. Mention --iso-8601=ns. (batch_convert): getline returns ssize_t, not int.
2004-02-05Don't dump core if localtime returns NULL (possible onJim Meyering
hosts with 64-bit time_t and 32-bit int). Include "inttostr.h". (batch_convert, main): If time conversion fails, exit with nonzero status. (show_date): Return int to report conversion failure. Print the time as an int if localtime fails.
2004-02-05Don't include timespec.h, now that system.h does it.Jim Meyering
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(FATAL_ERROR, main): Exit with status EXIT_FAILURE, not 2, on errors. (main): Don't assume EXIT_FAILURE == 1, as POSIX doesn't require it.
2003-11-04(show_date): Use x2nrealloc rather than xrealloc.Jim Meyering
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-08-01(long_options, usage, main): Add --rfc-2822 option to GNU date.Jim Meyering
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-07-19Include "exitfail.h".Jim Meyering
(main): Set exit_failure rather than calling close_stdout_set_status.
2003-07-11(batch_convert): Use the quote function rather than using literal `...' inJim Meyering
a diagnostic.
2003-07-11Include "quote.h".Jim Meyering
Use the quote function rather than using literal `...' in a diagnostic.
2003-06-17(main): Call initialize_main.Jim Meyering
2003-04-11Remove anachronistic casts of xmalloc,Jim Meyering
xrealloc, and xcalloc return values and of xrealloc's first argument.
2002-12-15Remove all uses of `PARAMS'.Jim Meyering