Fix IDATE (VXT) intrinsic
authorCraig Burley <craig@jcb-sc.com>
Tue, 2 Mar 1999 21:59:52 +0000 (21:59 +0000)
committerCraig Burley <burley@gcc.gnu.org>
Tue, 2 Mar 1999 21:59:52 +0000 (16:59 -0500)
From-SVN: r25551

gcc/f/ChangeLog
gcc/f/news.texi
libf2c/ChangeLog
libf2c/libU77/vxtidate_.c

index e5928e5d0065f5e86c4aa6c0d03c57bcf2421d95..d4d03e443e3a394e88dd449176bc5faad95b512e 100644 (file)
@@ -1,3 +1,7 @@
+Wed Mar  3 00:57:56 1999  Craig Burley  <craig@jcb-sc.com>
+
+       * news.texi: IDATE (VXT) fixed to return year as 0..99.
+
 Wed Mar  3 00:43:49 1999  Craig Burley  <craig@jcb-sc.com>
 
        * g77.texi: Add remaining changes pending from Dave Love.
index a66c40aee292906b7be02dde5963247b68841dd5..6cfe954e140be9e9aaa775bb2520fb10b261a09c 100644 (file)
@@ -64,6 +64,17 @@ somewhat more difficult.
 
 @heading In @code{egcs} 1.2:
 @itemize @bullet
+@item
+Fix the @code{IDate} Intrinsic (VXT)
+so the returned year is in the documented, non-Y2K-compliant range
+of 0--99,
+instead of being returned as 100 in the year 2000.
+
+@ifnothtml
+@xref{IDate Intrinsic (VXT)},
+for more information.
+@end ifnothtml
+
 @item
 Fix @code{g77} so it no longer crashes when compiling
 I/O statements using keywords that define @code{INTEGER} values,
index 1e396a05af6f44839b68fe17497661d25a8099e7..55300b04d99773943ec6100c1b0ff2ef41fdc333 100644 (file)
@@ -1,3 +1,9 @@
+1999-03-03  Craig Burley  <craig@jcb-sc.com>
+
+       * libU77/vxtidate_.c (G77_vxtidate_0): Truncate
+       year to last two digits (i.e. modulo 100), as per
+       documentation and (documented) Y2K non-compliance.
+
 1999-02-20  Craig Burley  <craig@jcb-sc.com>
 
        From Krister Walfridsson <cato@df.lth.se>:
index c517f29419e1775b72de4f0fd7fce0d513d6155a..03133ffa2ffb9bb42e558cd8e044e8f910af22a0 100644 (file)
@@ -48,7 +48,7 @@ int G77_vxtidate_0 (integer *m, integer *d, integer *y)
   time_t tim;
   tim = time(NULL);
   lt = localtime(&tim);
-  *y = lt->tm_year;
+  *y = lt->tm_year % 100;
   *m = lt->tm_mon+1;
   *d = lt->tm_mday;
   return 0;