lib/parse-datetime.y


Log

Author Commit Date CI Message
Paul Eggert a4d796fb 2012-02-05T13:42:03 maint: spelling fixes
Paul Eggert 51e801f2 2012-01-05T23:53:49 In commentary, do not use ` to quote.
Jim Meyering 1602f0af 2012-01-01T10:04:58 maint: update all copyright year number ranges Run "make update-copyright".
Jim Meyering 9e62d63e 2011-06-02T10:05:59 mark functions with const and pure attributes Mark functions per suggestions from gcc-4.6 when using these options: -Wsuggest-attribute=pure -Wsuggest-attribute=const. Use gnulib's _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST macros. Follow these guidelines: when possible, apply the attribute to an extern declaration, not to its definition. Apply it to the definition only when the definition is static. * lib/argmatch.h (argmatch, argmatch_to_argument): Mark. * lib/argv-iter.h (argv_iter_n_args): Likewise. * lib/base64.h (isbase64): Likewise. * lib/basename-lgpl.c (last_component, base_len): Likewise. * lib/c-ctype.h (c_isascii, c_isalnum, c_isalpha): Likewise. (c_isblank, c_iscntrl, c_isdigit, c_islower, c_isgraph): Likewise. (c_isprint, c_ispunct, c_isspace, c_isupper, c_isxdigit): Likewise. (c_tolower, c_toupper): Likewise. * lib/c-strcase.h (c_strcasecmp, c_strncasecmp): Likewise. * lib/chdir-long.c (find_non_slash): Likewise. * lib/dirname.h (base_len, dir_len, last_component): Likewise. * lib/exclude.h (fnmatch_pattern_has_wildcards): Likewise. * lib/file-type.h (file_type): Likewise. * lib/filenamecat-lgpl.c (longest_relative_suffix): Likewise. * lib/filevercmp.c (verrevcmp): Likewise. * lib/freadahead.h (freadahead): Likewise. * lib/fts.c (fts_maxarglen): Likewise. * lib/hash-pjw.h (hash_pjw): Likewise. * lib/hash-triple.h (triple_hash_no_name, triple_compare_ino_str): * lib/hash.c (is_prime, next_prime): Likewise. * lib/hash.c (hash_get_n_buckets, hash_get_n_buckets_used): Likewise. (hash_get_n_entries, hash_get_max_bucket_length): Likewise. (hash_table_ok, hash_get_first, hash_string): Likewise. (compute_bucket_size): Likewise. * lib/i-ring.h (i_ring_empty): Likewise. * lib/isnan.c (isnanl): Likewise. * lib/math.h (isnanl, rpl_isnanl): Likewise. * lib/memcasecmp.h (memcasecmp): Likewise. * lib/memchr2.h (memchr2): Likewise. * lib/memcmp2.h (memcmp2): Likewise. * lib/parse-datetime.y (lookup_zone): Likewise. * lib/sockets.h (gl_sockets_startup, gl_sockets_cleanup) [!WINDOWS_SOCKETS]: Likewise. * lib/strnlen1.h (strnlen1): Likewise. * lib/uniwidth.in.h (uc_width): Likewise, but since this is installed as a public header by libunistring, it cannot depend on the macro definitions of gnulib-common.m4, so open-code the __attribute__... * lib/quotearg.c: Add pragma to avoid unwarranted suggestion from gcc's -Wsuggest-attribute=pure for quoting_options_from_style. (quoting_options_from_style): Add a comment. * lib/propername.h (proper_name): Add a comment.
Eric Blake 8bfd5900 2011-09-16T14:52:54 date: accept 'hence' as opposite of 'ago' * lib/parse-datetime.y (relative_time_table): Add 'hence'. * tests/test-parse-datetime.c (main): Enhance test. Suggested by Jesse Wilson. Signed-off-by: Eric Blake <eblake@redhat.com>
Jim Meyering f02585c1 2011-08-31T17:15:35 maint: indent with spaces, not TABs I need to get in the habit of running gnulib's "make check". Both of these would have been caught. * m4/largefile.m4: Indent with spaces, not TABs. * lib/parse-datetime.y (iso_8601_time): Likewise. Spotted by Pádraig Brady.
J.T. Conklin c2ecbc9a 2011-08-17T16:40:49 parse-datetime: accept ISO 8601 date and time rep with "T" separator The parser now accepts ISO 8601 date-time strings with "T" as the separator. It has long parsed dates like "2004-02-29 16:21:42" with a space between the date and time strings. Now it also parses "2004-02-29T16:21:42" and fractional-second and time-zone-annotated variants like "2004-02-29T16:21:42.333-07:00" * lib/parse-datetime.y: Parse ISO 8601 extended date and time of day representation using the 'T' separator character. * doc/parse-datetime.texi (General date syntax): replace use of deprecated --iso-8601 option with --rfc-3339 in example of date command output formats that can be parsed. * tests/test-parse-datetime.c (tm_diff): New function, taken from lib/parse-datetime.y. (gmt_offset): New function. (main): Add additional test cases to validate ISO8601 extended date and time of day format parsing.
Jim Meyering a8ff65c5 2011-05-28T20:58:14 parse-datetime.y: accommodate -Wstrict-overflow * lib/parse-datetime.y (yylex): Rearrange pointer arithmetic to placate -Wstrict-overflow.
Jim Meyering 6829a6c0 2011-04-25T10:38:33 Revert "use _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE" This reverts commit 349d7fe0e307d59d508b3579317ee8d4eacfeb9c. Revert accidentally-pushed patch. Not yet ready.
Jim Meyering 349d7fe0 2011-04-24T19:02:10 use _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE
Jim Meyering d60f3b0c 2011-01-01T20:17:23 maint: update almost all copyright ranges to include 2011 Run the new "make update-copyright" rule.
Jim Meyering 9e43bb61 2010-10-07T23:15:00 parse-datetime: avoid compilation failure on OpenBSD 4.7 * lib/parse-datetime.y (_STDLIB_H) [_STDLIB_H_]: Define. This works around a compilation failure on OpenBSD 4.7: http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3418
Paul Eggert 464b2f68 2010-10-05T13:51:12 parse-datetime: do some more renaming * doc/parse-datetime.texi (Authors of parse_datetime): Call it parse_datetime, not get_date. Mention the renaming. * lib/parse-datetime.y: Call it parse_datetime, not getdate, in comments. * m4/bison.m4: Likewise.
Eric Blake 2bb63bfb 2010-10-05T11:40:11 parse-datetime: better name than get_date * NEWS: Reword the deprecation notice. * modules/get_date: Rename to modules/parse-datetime. * modules/get_date-tests: Rename to modules/parse-datetime-tests. * m4/get_date.m4: Rename to m4/parse-datetime.m4. * lib/get_date.y: Rename to lib/parse-datetime.y. * tests/test-get_date.c: Rename to tests/test-parse-datetime.c. * doc/get_date.texi: Rename to doc/parse-datetime.texi. * doc/getdate.texi: Provide fallback wrapper. * lib/getdate.h: Move guts, and wrap... * lib/parse-datetime.h: ...new file. * lib/parse-datetime.y (get_date): Rename... (parse_datetime): ...to this. * m4/parse-datetime.m4 (gl_GET_DATE): Rename... (gl_PARSE_DATETIME): ...to this. * doc/posix-functions/getdate.texi (get_date): Provide fallback documentation. * modules/getdate (Files): Provide fallback docs and header. (Notice, Depends-on): Update references. * tests/test-parse-datetime.c: Likewise. * DEPENDENCIES: Likewise. * MODULES.html.sh (Date and time <time.h>): Likewise. * doc/parse-datetime.texi (Date input formats) (Authors of parse_datetime): Likewise. * modules/parse-datetime (Files, configure.ac, Makefile.am) (Include): Likewise. * modules/parse-datetime-tests (Files, Makefile.am): Likewise. * gnulib-tool: Likewise. * m4/bison.m4 (gl_BISON): Likewise. Suggested by Bruno Haible. Signed-off-by: Eric Blake <eblake@redhat.com>