summaryrefslogtreecommitdiff
path: root/locale/programs/ld-time.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-12-21 17:50:57 +0000
committerUlrich Drepper <drepper@redhat.com>1999-12-21 17:50:57 +0000
commit958d68077b3fa1435c010711876a9229e5cd4192 (patch)
tree156271e1ee5af5f3127c9c1fad4dbfd868a976b4 /locale/programs/ld-time.c
parentbef248950aa7624e21c404948e8e5a7a3f2b83b7 (diff)
Update.
1999-12-21 Shinya Hanataka <hanataka@abyss.rim.or.jp> * locale/lc-time.c: Extend structure era_entry. * locale/localeinfo.h: Likewise. * locale/lc-time.c: Handle '-' direction used in locale's era part properly. * time/strptime.c: Likewise. * time/strftime.c: Likewise. * locale/programs/ld-time.c: Consider negative values in era part of locale as B.C.. * time/strptime.c (strptime_internal): Merged Yoshiyama's %E[CyY] implementation. 1999-12-21 Akira Yoshiyama <yosshy@debian.or.jp> * time/strptime.c (strptime_internal): Fix segV bugs of a couple of recursive() call. * time/strptime.c (strptime_internal): Implement `%EC',`%Ey',`%EY' parsing. 1999-12-21 Ulrich Drepper <drepper@cygnus.com> * sysdeps/arm/dl-machine.c (CLEAR_CACHE): Fix a2 value. Patch by Scott Bambrough <scottb@netwinder.org>.
Diffstat (limited to 'locale/programs/ld-time.c')
-rw-r--r--locale/programs/ld-time.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index b2c06cca7c..5e12c9ba78 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -285,6 +285,9 @@ time_finish (struct localedef_t *locale, struct charmap_t *charmap)
else
str = endp + 1;
time->era_entries[idx].start_date[0] -= 1900;
+ /* year -1 represent 1 B.C. (not -1 A.D.) */
+ if (time->era_entries[idx].start_date[0] < -1900)
+ ++time->era_entries[idx].start_date[0];
time->era_entries[idx].start_date[1] = strtol (str, &endp, 10);
if (endp == str || *endp != '/')
@@ -359,6 +362,9 @@ time_finish (struct localedef_t *locale, struct charmap_t *charmap)
else
str = endp + 1;
time->era_entries[idx].stop_date[0] -= 1900;
+ /* year -1 represent 1 B.C. (not -1 A.D.) */
+ if (time->era_entries[idx].stop_date[0] < -1900)
+ ++time->era_entries[idx].stop_date[0];
time->era_entries[idx].stop_date[1] = strtol (str, &endp, 10);
if (endp == str || *endp != '/')