[PHP-DEV] cvs: /php3/functions parsedate.y From: andrey (php-dev <email protected>)
Date: 07/13/99

andrey Tue Jul 13 09:14:28 1999 EDT

  Modified files:
    /php3/functions parsedate.y
  Log:
  Some fixes.
  
  
Index: php3/functions/parsedate.y
diff -u php3/functions/parsedate.y:1.5 php3/functions/parsedate.y:1.6
--- php3/functions/parsedate.y:1.5 Mon Jul 12 17:15:12 1999
+++ php3/functions/parsedate.y Tue Jul 13 09:14:28 1999
@@ -1,5 +1,5 @@
 %{
-/* $Revision: 1.5 $
+/* $Revision: 1.6 $
 **
 ** Originally written by Steven M. Bellovin <smb <email protected>> while
 ** at the University of North Carolina at Chapel Hill. Later tweaked by
@@ -18,20 +18,14 @@
 /* SUPPRESS 593 on yynewstate *//* Label was not used */
 /* SUPPRESS 595 on yypvt *//* Automatic variable may be used before set */
 
+#include "config.h"
 #include <stdio.h>
 #include <sys/types.h>
-/*
-#include "configdata.h"
-#include "clibrary.h"*/
-#if defined(DO_NEED_TIME)
 #include <time.h>
-#endif /* defined(DO_NEED_TIME) */
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 #include <ctype.h>
-/*#include "libinn.h"
-#include "macros.h"*/
 
 #if defined(_HPUX_SOURCE)
 #include <alloca.h>
@@ -267,22 +261,22 @@
         }
         | tUNUMBER '/' tUNUMBER '/' tUNUMBER {
             if ($1 > 100) {
- /* assume YYYY/MM/DD format, so need not to add 1900 */
- yyYear = $1;
- yyMonth = $3;
- yyDay = $5;
+ /* assume YYYY/MM/DD format, so need not to add 1900 */
+ yyYear = $1;
+ yyMonth = $3;
+ yyDay = $5;
             }
             else {
- /* assume MM/DD/YY* format */
- yyMonth = $1;
- yyDay = $3;
- if ($5 > 100) {
- /* assume year is YYYY format, so need not to add 1900 */
- yyYear = $5;
- } else {
- /* assume year is YY format, so need to add 1900 */
- yyYear = $5 + 1900;
- }
+ /* assume MM/DD/YY* format */
+ yyMonth = $1;
+ yyDay = $3;
+ if ($5 > 100) {
+ /* assume year is YYYY format, so need not to add 1900 */
+ yyYear = $5;
+ } else {
+ /* assume year is YY format, so need to add 1900 */
+ yyYear = $5 + 1900;
+ }
             }
         }
         | tMONTH tUNUMBER {

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>