--- wiki2/includes/DateFormatter.php Thu Oct 23 14:48:54 2008 +++ wiki/includes/DateFormatter.php Tue Nov 4 11:17:34 2008 @@ -69,14 +69,14 @@ $this->keys[self::ISO2] = 'ymd'; # Target date formats - $this->targets[self::DMY] = '[[F j|j F]] [[Y]]'; - $this->targets[self::YDM] = '[[Y]], [[F j|j F]]'; - $this->targets[self::MDY] = '[[F j]], [[Y]]'; - $this->targets[self::YMD] = '[[Y]] [[F j]]'; - $this->targets[self::DM] = '[[F j|j F]]'; - $this->targets[self::MD] = '[[F j]]'; - $this->targets[self::ISO1] = '[[Y|y]]-[[F j|m-d]]'; - $this->targets[self::ISO2] = '[[y-m-d]]'; + $this->targets[self::DMY] = 'j F Y'; + $this->targets[self::YDM] = 'Y, j F'; + $this->targets[self::MDY] = 'F j, Y'; + $this->targets[self::YMD] = 'Y F j'; + $this->targets[self::DM] = 'j F'; + $this->targets[self::MD] = 'F j'; + $this->targets[self::ISO1] = 'y-m-d'; + $this->targets[self::ISO2] = 'y-m-d'; # Rules # pref source target @@ -121,6 +121,13 @@ } else { $preference = self::NONE; } + if ( $preference == self::NONE ) { + if(preg_match('/en-US/', $_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + $preference = self::MDY; + } else { + $preference = self::DMY; + } + } for ( $i=1; $i<=self::LAST; $i++ ) { $this->mSource = $i; if ( isset ( $this->rules[$preference][$i] ) ) {