Merge "Make sure Parsoid doesn't get snobbish and treat non-html5 tags badly."
[lhc/web/wiklou.git] / includes / Timestamp.php
index 3b7b801..3066ca9 100644 (file)
@@ -42,7 +42,6 @@ class MWTimestamp {
                TS_RFC2822 => 'D, d M Y H:i:s',
                TS_ORACLE => 'd-m-Y H:i:s.000000', // Was 'd-M-y h.i.s A' . ' +00:00' before r51500
                TS_POSTGRES => 'Y-m-d H:i:s',
-               TS_DB2 => 'Y-m-d H:i:s',
        );
 
        /**
@@ -54,7 +53,9 @@ class MWTimestamp {
                "seconds" => 1000, // 1000 milliseconds per second
                "minutes" => 60, // 60 seconds per minute
                "hours" => 60, // 60 minutes per hour
-               "days" => 24 // 24 hours per day
+               "days" => 24, // 24 hours per day
+               "months" => 30, // approximately 30 days per month
+               "years" => 12, // 12 months per year
        );
 
        /**
@@ -116,8 +117,6 @@ class MWTimestamp {
                        # TS_POSTGRES
                } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/', $ts, $da ) ) {
                        # TS_POSTGRES
-               } elseif (preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.\d\d\d$/', $ts, $da ) ) {
-                       # TS_DB2
                } elseif ( preg_match( '/^[ \t\r\n]*([A-Z][a-z]{2},[ \t\r\n]*)?' . # Day of week
                                                                '\d\d?[ \t\r\n]*[A-Z][a-z]{2}[ \t\r\n]*\d{2}(?:\d{2})?' .  # dd Mon yyyy
                                                                '[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d/S', $ts ) ) { # hh:mm:ss