Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2575
patch.txt
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 9:01 PM
2014-11-21 21:01:59 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
patch.txt
View Options
--- 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] ) ) {
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2150
Default Alt Text
patch.txt (1 KB)
Attached To
Mode
T6582: Provide preference-based autoformatting for unlinked dates
Attached
Detach File
Event Timeline
Log In to Comment