/[corp_html]/back/phormation/date_fcns.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /back/phormation/date_fcns.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Fri Jan 26 17:53:58 2001 UTC revision 1.2 by dpavlin, Thu Feb 22 17:49:14 2001 UTC
# Line 54  Line 54 
54      // parses a PostgreSQL date in format YYYY/MM/DD or YYYY-MM-DD      // parses a PostgreSQL date in format YYYY/MM/DD or YYYY-MM-DD
55      // into month, day, year components      // into month, day, year components
56      function parse_date( $date ) {      function parse_date( $date ) {
57          $array["year"] = strtok( $date, "/-" );          $array["year"] = strtok( $date, "/-." );
58          $array["month"] = strtok( "/-" );          $array["month"] = strtok( "/-." );
59          $array["day"] = strtok( "/-" );          $array["day"] = strtok( "/-." );
60            // support euro style of dates dd.mm.yyyy
61            if ($array["day"] > 1900 && $array["year"] < 32) {
62                    $foo=$array["year"];
63                    $array["year"]=$array["day"];
64                    $array["day"]=$foo;
65            }
66          return $array;          return $array;
67      }      }
68    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.26