]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
parse-datetime: better name than get_date
authorEric Blake <eblake@redhat.com>
Tue, 5 Oct 2010 17:40:11 +0000 (11:40 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 5 Oct 2010 18:05:18 +0000 (12:05 -0600)
* 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>
19 files changed:
ChangeLog
DEPENDENCIES
MODULES.html.sh
NEWS
doc/getdate.texi [new file with mode: 0644]
doc/parse-datetime.texi [moved from doc/get_date.texi with 97% similarity]
doc/posix-functions/getdate.texi
gnulib-tool
lib/getdate.h
lib/parse-datetime.h [new file with mode: 0644]
lib/parse-datetime.y [moved from lib/get_date.y with 99% similarity]
m4/bison.m4
m4/parse-datetime.m4 [moved from m4/get_date.m4 with 92% similarity]
modules/get_date [deleted file]
modules/get_date-tests [deleted file]
modules/getdate
modules/parse-datetime [new file with mode: 0644]
modules/parse-datetime-tests [new file with mode: 0644]
tests/test-parse-datetime.c [moved from tests/test-get_date.c with 78% similarity]

index 6cf569a79129bf7278980d32adc29457ed24ffc0..4345d5e86a46d489142dab8b0f2250979b3fa3a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,37 @@
 
 2010-10-05  Eric Blake  <eblake@redhat.com>
 
+       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.
+
        bootstrap: fix Solaris regression
        * build-aux/bootstrap (check_versions): Solaris tr still needs []
        around ranges.
index b4ec630668121864068a8ea96699405e568176fd..2117e7dbceca1e16e2bf5f1d342d0d487e3f1e83 100644 (file)
@@ -101,7 +101,7 @@ at any time.
 
 * Bison 2.0 or newer.
   + Recommended.
-    Needed if you use the 'get_date' module.
+    Needed if you use the 'parse-datetime' module.
   + Homepage:
     http://www.gnu.org/software/bison/
   + Download:
index c356b0157f670d4d5701c4ac5206abc089ad1c51..eb5b642d365f0e7d1e9f715ab891e9651526aa30 100755 (executable)
@@ -1835,7 +1835,7 @@ func_all_modules ()
   func_echo "$element"
 
   func_begin_table
-  func_module get_date
+  func_module parse-datetime
   func_module timegm
   func_module tzset
   func_end_table
diff --git a/NEWS b/NEWS
index 20cc20ded365ae1ceca174793f1d274dd51235e0..76239ddb03e78b8e1d07ec027be80e6e4344852b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,10 +12,12 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
-2010-09-30  getdate         This module is deprecated. Please use get_date
-                            for get_date(), or help us write getdate-posix
-                            for getdate(). Also, doc/getdate.texi has been
-                            renamed to doc/get_date.texi.
+2010-10-05  getdate         This module is deprecated. Please use the new
+                            parse-datetime module for the replacement
+                            function parse_datetime(), or help us write
+                            getdate-posix for getdate(). Also, the header
+                            "getdate.h" has been renamed "parse-datetime.h",
+                            and doc/getdate.texi to doc/parse-datetime.texi.
 
 2010-09-29  sys_wait        This module no longer provides the waitpid()
                             function. If you need this function, you now need
diff --git a/doc/getdate.texi b/doc/getdate.texi
new file mode 100644 (file)
index 0000000..099b1bb
--- /dev/null
@@ -0,0 +1 @@
+@include parse-datetime.texi
similarity index 97%
rename from doc/get_date.texi
rename to doc/parse-datetime.texi
index 85c39f5a92a124e75b9980ea862d4de9bfd5c59e..496709cc350fe57317e2ad7cdf8a4389e6f4c22a 100644 (file)
@@ -14,7 +14,7 @@
 @chapter Date input formats
 
 @cindex date input formats
-@findex get_date
+@findex parse_datetime
 
 First, a quote:
 
@@ -45,7 +45,7 @@ or a week from Sunday, with feelings of helpless confusion.  @dots{}
 This section describes the textual date representations that @sc{gnu}
 programs accept.  These are the strings you, as a user, can supply as
 arguments to the various programs.  The C interface (via the
-@code{get_date} function) is not described here.
+@code{parse_datetime} function) is not described here.
 
 @menu
 * General date syntax::            Common rules.
@@ -57,7 +57,7 @@ arguments to the various programs.  The C interface (via the
 * Pure numbers in date strings::   19931219, 1440.
 * Seconds since the Epoch::        @@1078100502.
 * Specifying time zone rules::     TZ="America/New_York", TZ="UTC0".
-* Authors of get_date::            Bellovin, Eggert, Salz, Berets, et al.
+* Authors of parse_datetime::      Bellovin, Eggert, Salz, Berets, et al.
 @end menu
 
 
@@ -530,10 +530,12 @@ daylight saving time; other rules can specify simple daylight saving
 regimes.  @xref{TZ Variable,, Specifying the Time Zone with @code{TZ},
 libc, The GNU C Library}.
 
-@node Authors of get_date
-@section Authors of @code{get_date}
+@node Authors of parse_datetime
+@section Authors of @code{parse_datetime}
+@c the anchor keeps the old node name, to try to avoid breaking links
+@anchor{Authors of get_date}
 
-@cindex authors of @code{get_date}
+@cindex authors of @code{parse_datetime}
 
 @cindex Bellovin, Steven M.
 @cindex Salz, Rich
@@ -547,10 +549,11 @@ at Chapel Hill.  The code was later tweaked by a couple of people on
 Usenet, then completely overhauled by Rich $alz (@email{rsalz@@bbn.com})
 and Jim Berets (@email{jberets@@bbn.com}) in August, 1990.  Various
 revisions for the @sc{gnu} system were made by David MacKenzie, Jim Meyering,
-Paul Eggert and others.
+Paul Eggert and others, including renaming it to @code{parse_datetime}
+to avoid confusion with the Posix function @code{getdate}.
 
 @cindex Pinard, F.
 @cindex Berry, K.
 This chapter was originally produced by Fran@,{c}ois Pinard
-(@email{pinard@@iro.umontreal.ca}) from the @file{get_date.y} source code,
+(@email{pinard@@iro.umontreal.ca}) from the @file{parse_datetime.y} source code,
 and then edited by K.@: Berry (@email{kb@@cs.umb.edu}).
index 156713aeb286bcede60b08dba784e2372c998145..144c2c74041d3620bdb7ed3e81637a76a301d125 100644 (file)
@@ -17,6 +17,6 @@ This function is missing on some platforms:
 MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Cygwin, mingw, BeOS.
 @end itemize
 
-Gnulib provides a module @code{get_date} that contains a function
-@code{get_date}
+Gnulib provides a module @code{parse-datetime} that contains a function
+@code{parse_datetime}
 that has similar functionality as the @code{getdate} function.
index afd649369198d44d26c4d1b9d89278f7a6957c73..0e1694d76fedff04eee1dc475f31fbd470beb0f9 100755 (executable)
@@ -5354,7 +5354,7 @@ func_create_testdir ()
     ) || func_exit 1
   fi
   # Need to run configure and make once, to create built files that are to be
-  # distributed (such as get_date.c).
+  # distributed (such as parse-datetime.c).
   sed_remove_make_variables='s,[$]([A-Za-z0-9_]*),,g'
   # Extract the value of "CLEANFILES += ..." and "MOSTLYCLEANFILES += ...".
   cleaned_files=`sed -e "$sed_remove_backslash_newline" < "$testdir/$sourcebase/Makefile.am" \
index 22cc2c02a343679b78c9a6964a2a2874b09f4aa9..9f5d1a9d5a8891f55abddc58c22ad64b77e4d1c5 100644 (file)
@@ -1,22 +1,3 @@
-/* Parse a string into an internal time stamp.
-
-   Copyright (C) 1995, 1997, 1998, 2003, 2004, 2007, 2009, 2010 Free Software
-   Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include <stdbool.h>
-#include <time.h>
-
-bool get_date (struct timespec *, char const *, struct timespec const *);
+/* Obsolete; consider using parse-datetime.h instead.  */
+#include "parse-datetime.h"
+#define get_date(a, b, c) parse_datetime (a, b, c)
diff --git a/lib/parse-datetime.h b/lib/parse-datetime.h
new file mode 100644 (file)
index 0000000..9685d9b
--- /dev/null
@@ -0,0 +1,22 @@
+/* Parse a string into an internal time stamp.
+
+   Copyright (C) 1995, 1997, 1998, 2003, 2004, 2007, 2009, 2010 Free Software
+   Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <stdbool.h>
+#include <time.h>
+
+bool parse_datetime (struct timespec *, char const *, struct timespec const *);
similarity index 99%
rename from lib/get_date.y
rename to lib/parse-datetime.y
index 445865bdb839ebbe2f3c9e44e94c6182daaeb453..f22c754e0fdcde3eede5162418fa37828d9566fa 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <config.h>
 
-#include "getdate.h"
+#include "parse-datetime.h"
 
 #include "intprops.h"
 #include "timespec.h"
@@ -1201,7 +1201,8 @@ get_tz (char tzbuf[TZBUFSIZE])
    P can be an incomplete or relative time specification; if so, use
    *NOW as the basis for the returned time.  */
 bool
-get_date (struct timespec *result, char const *p, struct timespec const *now)
+parse_datetime (struct timespec *result, char const *p,
+                struct timespec const *now)
 {
   time_t Start;
   long int Start_ns;
@@ -1550,7 +1551,7 @@ main (int ac, char **av)
     {
       struct timespec d;
       struct tm const *tm;
-      if (! get_date (&d, buff, NULL))
+      if (! parse_datetime (&d, buff, NULL))
         printf ("Bad format - couldn't convert.\n");
       else if (! (tm = localtime (&d.tv_sec)))
         {
index e9272cbfae2c678f172c650be32b9f45c2174d09..bd8225dd5bb56e91dbd98b30efa424ca458760b8 100644 (file)
@@ -7,7 +7,7 @@
 
 AC_DEFUN([gl_BISON],
 [
-  # get_date.y works with bison only.
+  # parse-datetime.y works with bison only.
   : ${YACC='bison -y'}
 dnl
 dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB
similarity index 92%
rename from m4/get_date.m4
rename to m4/parse-datetime.m4
index b71da821765b3f894f260d967a2705dc0822cedd..d7812922ba64e632c18a9095eca2b1387752d27b 100644 (file)
@@ -1,4 +1,4 @@
-# get_date.m4 serial 17
+# parse-datetime.m4 serial 18
 dnl Copyright (C) 2002-2006, 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -24,13 +24,13 @@ AC_DEFUN([gl_C_COMPOUND_LITERALS],
   fi
 ])
 
-AC_DEFUN([gl_GET_DATE],
+AC_DEFUN([gl_PARSE_DATETIME],
 [
-  dnl Prerequisites of lib/getdate.h.
+  dnl Prerequisites of lib/parse-datetime.h.
   AC_REQUIRE([AM_STDBOOL_H])
   AC_REQUIRE([gl_TIMESPEC])
 
-  dnl Prerequisites of lib/get_date.y.
+  dnl Prerequisites of lib/parse-datetime.y.
   AC_REQUIRE([gl_BISON])
   AC_REQUIRE([gl_C_COMPOUND_LITERALS])
   AC_STRUCT_TIMEZONE
diff --git a/modules/get_date b/modules/get_date
deleted file mode 100644 (file)
index e3997ac..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-Description:
-Convert a date/time string to linear time.
-
-Files:
-doc/get_date.texi
-lib/getdate.h
-lib/get_date.y
-m4/bison.m4
-m4/tm_gmtoff.m4
-m4/get_date.m4
-
-Depends-on:
-c-ctype
-stdbool
-gettime
-intprops
-mktime
-setenv
-unsetenv
-time
-verify
-xalloc
-
-configure.ac:
-gl_GET_DATE
-
-Makefile.am:
-# This rule overrides the Automake generated .y.c rule, to ensure that the
-# get_date.c file gets generated in the source directory, not in the build
-# directory.
-get_date.c: get_date.y
-       $(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/get_date.y \
-                                     y.tab.c get_date.c \
-                                     y.tab.h getdate.h \
-                                     y.output get_date.output \
-                                     -- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \
-       mv get_date.c get_date.c-t && \
-       mv get_date.c-t $(srcdir)/get_date.c
-lib_SOURCES += get_date.y
-BUILT_SOURCES += get_date.c
-MOSTLYCLEANFILES += get_date.c-t
-MAINTAINERCLEANFILES += get_date.c
-EXTRA_DIST += get_date.c
-
-Include:
-"getdate.h"
-
-License:
-GPL
-
-Maintainer:
-Paul Eggert
diff --git a/modules/get_date-tests b/modules/get_date-tests
deleted file mode 100644 (file)
index cb96ff6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Files:
-tests/test-get_date.c
-tests/macros.h
-
-Depends-on:
-progname
-setenv
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-get_date
-check_PROGRAMS += test-get_date
-test_get_date_LDADD = $(LDADD) @LIBINTL@ $(LIB_CLOCK_GETTIME)
index 2f23036151207bcddd56a8f421c451f179e19949..5dca5cfdc924d9930b3b915817f57694a3941cca 100644 (file)
@@ -5,12 +5,14 @@ Status:
 obsolete
 
 Notice:
-This module is obsolete. Use the module 'get_date' instead.
+This module is obsolete. Use the module 'parse-datetime' instead.
 
 Files:
+doc/getdate.texi
+lib/getdate.h
 
 Depends-on:
-get_date
+parse-datetime
 
 configure.ac:
 
diff --git a/modules/parse-datetime b/modules/parse-datetime
new file mode 100644 (file)
index 0000000..4842706
--- /dev/null
@@ -0,0 +1,52 @@
+Description:
+Convert a date/time string to linear time.
+
+Files:
+doc/parse-datetime.texi
+lib/parse-datetime.h
+lib/parse-datetime.y
+m4/bison.m4
+m4/tm_gmtoff.m4
+m4/parse-datetime.m4
+
+Depends-on:
+c-ctype
+stdbool
+gettime
+intprops
+mktime
+setenv
+unsetenv
+time
+verify
+xalloc
+
+configure.ac:
+gl_PARSE_DATETIME
+
+Makefile.am:
+# This rule overrides the Automake generated .y.c rule, to ensure that the
+# parse-datetime.c file gets generated in the source directory, not in the
+# build directory.
+parse-datetime.c: parse-datetime.y
+       $(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/parse-datetime.y \
+                                     y.tab.c parse-datetime.c \
+                                     y.tab.h parse-datetime.h \
+                                     y.output parse-datetime.output \
+                                     -- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \
+       mv parse-datetime.c parse-datetime.c-t && \
+       mv parse-datetime.c-t $(srcdir)/parse-datetime.c
+lib_SOURCES += parse-datetime.y
+BUILT_SOURCES += parse-datetime.c
+MOSTLYCLEANFILES += parse-datetime.c-t
+MAINTAINERCLEANFILES += parse-datetime.c
+EXTRA_DIST += parse-datetime.c
+
+Include:
+"parse-datetime.h"
+
+License:
+GPL
+
+Maintainer:
+Paul Eggert
diff --git a/modules/parse-datetime-tests b/modules/parse-datetime-tests
new file mode 100644 (file)
index 0000000..04feed2
--- /dev/null
@@ -0,0 +1,14 @@
+Files:
+tests/test-parse-datetime.c
+tests/macros.h
+
+Depends-on:
+progname
+setenv
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-parse-datetime
+check_PROGRAMS += test-parse-datetime
+test_parse_datetime_LDADD = $(LDADD) @LIBINTL@ $(LIB_CLOCK_GETTIME)
similarity index 78%
rename from tests/test-get_date.c
rename to tests/test-parse-datetime.c
index 5f7095c5c90102a2717591a3071dbe18c53b8fd7..bc90209c4f46f941420d16bbe8ecda013a7393f4 100644 (file)
@@ -1,4 +1,4 @@
-/* Test of getdate() function.
+/* Test of parse_datetime() function.
    Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -19,7 +19,7 @@
 
 #include <config.h>
 
-#include "getdate.h"
+#include "parse-datetime.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -62,14 +62,14 @@ main (int argc _GL_UNUSED, char **argv)
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "now";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   ASSERT (now.tv_sec == result.tv_sec && now.tv_nsec == result.tv_nsec);
 
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "tomorrow";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   ASSERT (now.tv_sec + 24 * 60 * 60 == result.tv_sec
           && now.tv_nsec == result.tv_nsec);
@@ -77,7 +77,7 @@ main (int argc _GL_UNUSED, char **argv)
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "yesterday";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   ASSERT (now.tv_sec - 24 * 60 * 60 == result.tv_sec
           && now.tv_nsec == result.tv_nsec);
@@ -85,7 +85,7 @@ main (int argc _GL_UNUSED, char **argv)
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "4 hours";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   ASSERT (now.tv_sec + 4 * 60 * 60 == result.tv_sec
           && now.tv_nsec == result.tv_nsec);
@@ -94,10 +94,10 @@ main (int argc _GL_UNUSED, char **argv)
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC+400 +24 hours";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   p = "UTC+400 +1 day";
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
@@ -106,15 +106,15 @@ main (int argc _GL_UNUSED, char **argv)
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC+14:00";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   p = "UTC+14";
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
   p = "UTC+1400";
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
@@ -122,15 +122,15 @@ main (int argc _GL_UNUSED, char **argv)
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC-14:00";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   p = "UTC-14";
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
   p = "UTC-1400";
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
@@ -138,10 +138,10 @@ main (int argc _GL_UNUSED, char **argv)
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC+0:15";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   p = "UTC+0015";
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
@@ -149,65 +149,65 @@ main (int argc _GL_UNUSED, char **argv)
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC-1:30";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   p = "UTC-130";
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
 
 
-  /* TZ out of range should cause get_date failure */
+  /* TZ out of range should cause parse_datetime failure */
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC+25:00";
-  ASSERT (!get_date (&result, p, &now));
+  ASSERT (!parse_datetime (&result, p, &now));
 
         /* Check for several invalid countable dayshifts */
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC+4:00 +40 yesterday";
-  ASSERT (!get_date (&result, p, &now));
+  ASSERT (!parse_datetime (&result, p, &now));
   p = "UTC+4:00 next yesterday";
-  ASSERT (!get_date (&result, p, &now));
+  ASSERT (!parse_datetime (&result, p, &now));
   p = "UTC+4:00 tomorrow ago";
-  ASSERT (!get_date (&result, p, &now));
+  ASSERT (!parse_datetime (&result, p, &now));
   p = "UTC+4:00 40 now ago";
-  ASSERT (!get_date (&result, p, &now));
+  ASSERT (!parse_datetime (&result, p, &now));
   p = "UTC+4:00 last tomorrow";
-  ASSERT (!get_date (&result, p, &now));
+  ASSERT (!parse_datetime (&result, p, &now));
   p = "UTC+4:00 -4 today";
-  ASSERT (!get_date (&result, p, &now));
+  ASSERT (!parse_datetime (&result, p, &now));
 
   /* And check correct usage of dayshifts */
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC+400 tomorrow";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   p = "UTC+400 +1 day";
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC+400 yesterday";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   p = "UTC+400 1 day ago";
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
   now.tv_sec = 4711;
   now.tv_nsec = 1267;
   p = "UTC+400 now";
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   p = "UTC+400 +0 minutes"; /* silly, but simple "UTC+400" is different*/
-  ASSERT (get_date (&result2, p, &now));
+  ASSERT (parse_datetime (&result2, p, &now));
   LOG (p, now, result2);
   ASSERT (result.tv_sec == result2.tv_sec
           && result.tv_nsec == result2.tv_nsec);
@@ -221,7 +221,7 @@ main (int argc _GL_UNUSED, char **argv)
       sprintf (tmp, "NEXT %s", day_table[i]);
       now.tv_sec = thur2 + 4711;
       now.tv_nsec = 1267;
-      ASSERT (get_date (&result, tmp, &now));
+      ASSERT (parse_datetime (&result, tmp, &now));
       LOG (tmp, now, result);
       ASSERT (result.tv_nsec == 0);
       ASSERT (result.tv_sec == thur2 + (i == 4 ? 7 : (i + 3) % 7) * 24 * 3600);
@@ -229,7 +229,7 @@ main (int argc _GL_UNUSED, char **argv)
       sprintf (tmp, "LAST %s", day_table[i]);
       now.tv_sec = thur2 + 4711;
       now.tv_nsec = 1267;
-      ASSERT (get_date (&result, tmp, &now));
+      ASSERT (parse_datetime (&result, tmp, &now));
       LOG (tmp, now, result);
       ASSERT (result.tv_nsec == 0);
       ASSERT (result.tv_sec == thur2 + ((i + 3) % 7 - 7) * 24 * 3600);
@@ -238,7 +238,7 @@ main (int argc _GL_UNUSED, char **argv)
   p = "THURSDAY UTC+00";  /* The epoch was on Thursday.  */
   now.tv_sec = 0;
   now.tv_nsec = 0;
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   ASSERT (result.tv_sec == now.tv_sec
           && result.tv_nsec == now.tv_nsec);
@@ -246,7 +246,7 @@ main (int argc _GL_UNUSED, char **argv)
   p = "FRIDAY UTC+00";
   now.tv_sec = 0;
   now.tv_nsec = 0;
-  ASSERT (get_date (&result, p, &now));
+  ASSERT (parse_datetime (&result, p, &now));
   LOG (p, now, result);
   ASSERT (result.tv_sec == 24 * 3600
           && result.tv_nsec == now.tv_nsec);