localizable as 'datedefault' message. Tweaked lots of languages files...
* Allow $wgFeedCacheTimeout of 0 to disable feed caching
* Fix WebRequest::getRequestURL() to strip off the host bits squid prepends
* Require POST for action=purge, to stop bots from purging the cache
+* (bug 3817) Use localized date formats in preferences; 'no preference' option
+ localizable as 'datedefault' message. Tweaked lots of languages files...
+
=== Caveats ===
if ($dateopts) {
$wgOut->addHTML( "<fieldset>\n<legend>" . wfMsg( 'dateformat' ) . "</legend>\n" );
$idCnt = 0;
+ $epoch = '20010115161234';
foreach($dateopts as $key => $option) {
+ if( $key == MW_DATE_DEFAULT ) {
+ $formatted = wfMsgHtml( 'datedefault' );
+ } else {
+ $formatted = htmlspecialchars( $wgLang->timeanddate( $epoch, false, $key ) );
+ }
($key == $this->mDate) ? $checked = ' checked="checked"' : $checked = '';
$wgOut->addHTML( "<div><input type='radio' name=\"wpDate\" id=\"wpDate$idCnt\" ".
- "value=\"$key\"$checked /> <label for=\"wpDate$idCnt\">$option</label></div>\n" );
+ "value=\"$key\"$checked /> <label for=\"wpDate$idCnt\">$formatted</label></div>\n" );
$idCnt++;
}
$wgOut->addHTML( "</fieldset>\n" );
MW_MATH_MATHML => 'mw_math_mathml'
);
-# Whether to use user or default setting in Language::date()
-
-/* private */ $wgDateFormatsEn = array(
+/**
+ * Whether to use user or default setting in Language::date()
+ *
+ * NOTE: the array string values are no longer important!
+ * The actual date format functions are now called for the selection in
+ * Special:Preferences, and the 'datedefault' message for MW_DATE_DEFAULT.
+ *
+ * The array keys make up the set of formats which this language allows
+ * the user to select. It's exposed via Language::getDateFormats().
+ *
+ * @access private
+ */
+$wgDateFormatsEn = array(
MW_DATE_DEFAULT => 'No preference',
- MW_DATE_MDY => '16:12, January 15, 2001',
MW_DATE_DMY => '16:12, 15 January 2001',
+ MW_DATE_MDY => '16:12, January 15, 2001',
MW_DATE_YMD => '16:12, 2001 January 15',
MW_DATE_ISO => '2001-01-15 16:12:34'
);
'skin' => 'Skin',
'math' => 'Math',
'dateformat' => 'Date format',
+'datedefault' => 'No preference',
'datetime' => 'Date and time',
'math_failure' => 'Failed to parse',
'math_unknown_error' => 'unknown error',
* [...]
*</code>
*
- * @param bool $usePrefs: if false, the site/language default is used
+ * @param mixed $usePrefs: if true, the user's preference is used
+ * if false, the site/language default is used
+ * if int/string, assumed to be a format.
* @return string
*/
function dateFormat( $usePrefs = true ) {
global $wgUser, $wgAmericanDates;
- if( $usePrefs ) {
- $datePreference = $wgUser->getOption( 'date' );
+ if( is_bool( $usePrefs ) ) {
+ if( $usePrefs ) {
+ $datePreference = $wgUser->getOption( 'date' );
+ } else {
+ $options = $this->getDefaultUserOptions();
+ $datePreference = (string)$options['date'];
+ }
} else {
- $options = $this->getDefaultUserOptions();
- $datePreference = (string)$options['date'];
+ $datePreference = (string)$usePrefs;
}
if( $datePreference == MW_DATE_DEFAULT || $datePreference == '' ) {
* date('YmdHis') format with wfTimestamp(TS_MW,$ts)
* @param bool $adj whether to adjust the time output according to the
* user configured offset ($timecorrection)
- * @param bool $format true to use user's date format preference
+ * @param mixed $format true to use user's date format preference
* @param string $timecorrection the time offset as returned by
* validateTimeZone() in Special:Preferences
* @return string
$datePreference = $this->dateFormat( $format );
- $month = $this->getMonthName( substr( $ts, 4, 2 ) );
- $day = $this->formatNum( 0 + substr( $ts, 6, 2 ) );
+ $month = $this->formatMonth( substr( $ts, 4, 2 ), $datePreference );
+ $day = $this->formatDay( substr( $ts, 6, 2 ), $datePreference );
$year = $this->formatNum( substr( $ts, 0, 4 ), true );
switch( $datePreference ) {
* date('YmdHis') format with wfTimestamp(TS_MW,$ts)
* @param bool $adj whether to adjust the time output according to the
* user configured offset ($timecorrection)
- * @param bool $format true to use user's date format preference
+ * @param mixed $format true to use user's date format preference
* @param string $timecorrection the time offset as returned by
* validateTimeZone() in Special:Preferences
* @return string
if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
$datePreference = $this->dateFormat( $format );
-
- $t = substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 );
+
+ $sep = ($datePreference == MW_DATE_ISO)
+ ? ':'
+ : $this->timeSeparator( $format );
+
+ $t = substr( $ts, 8, 2 ) . $sep . substr( $ts, 10, 2 );
if ( $datePreference == MW_DATE_ISO ) {
- $t .= ':' . substr( $ts, 12, 2 );
+ $t .= $sep . substr( $ts, 12, 2 );
}
return $this->formatNum( $t );
}
+
+ /**
+ * Default separator character between hours, minutes, and seconds.
+ * Will be used by Language::time() for non-ISO formats.
+ * (ISO will always use a colon.)
+ * @return string
+ */
+ function timeSeparator( $format ) {
+ return ':';
+ }
+
+ /**
+ * String to insert between the time and the date in a combined
+ * string. Should include any relevant whitespace.
+ * @return string
+ */
+ function timeDateSeparator( $format ) {
+ return ', ';
+ }
+
+ /**
+ * Return true if the time should display before the date.
+ * @return bool
+ * @access private
+ */
+ function timeBeforeDate() {
+ return true;
+ }
+
+ function formatMonth( $month, $format ) {
+ return $this->getMonthName( $month );
+ }
+
+ function formatDay( $day, $format ) {
+ return $this->formatNum( 0 + $day );
+ }
/**
* @access public
* date('YmdHis') format with wfTimestamp(TS_MW,$ts)
* @param bool $adj whether to adjust the time output according to the
* user configured offset ($timecorrection)
- * @param bool $format true to use user's date format preference
+ * @param mixed $format true to use user's date format preference
* @param string $timecorrection the time offset as returned by
* validateTimeZone() in Special:Preferences
* @return string
switch ( $datePreference ) {
case MW_DATE_ISO: return $this->date( $ts, $adj, $format, $timecorrection ) . ' ' .
$this->time( $ts, $adj, $format, $timecorrection );
- default: return $this->time( $ts, $adj, $format, $timecorrection ) . ', ' .
- $this->date( $ts, $adj, $format, $timecorrection );
+ default:
+ $time = $this->time( $ts, $adj, $format, $timecorrection );
+ $sep = $this->timeDateSeparator( $datePreference );
+ $date = $this->date( $ts, $adj, $format, $timecorrection );
+ return $this->timeBeforeDate( $datePreference )
+ ? $time . $sep . $date
+ : $date . $sep . $time;
}
}
global $wgMagicWordsBe;
return $wgMagicWordsBe;
}
-
- // The date and time format
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.
- // 20050310001506 => 10.03.2005
- $date = (substr( $ts, 6, 2 )) . '.' . substr( $ts, 4, 2 ) . '.' . substr( $ts, 0, 4 );
- return $date;
- }
-
- function time( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
- // 20050310001506 => 00:15
- $time = substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 );
- return $time;
+
+ function getDateFormats() {
+ return $wgDateFormatsBe = array(
+ MW_DATE_DEFAULT => MW_DATE_DEFAULT,
+ '16:12, 15.01.2001' => '16:12, 15.01.2001',
+ MW_DATE_ISO => MW_DATE_ISO
+ );
}
- function timeanddate( $ts, $adj = false ) {
- return $this->time( $ts, $adj ) . ', ' .$this->date( $ts, $adj );
+ // The date and time format
+ function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
+ $datePreference = $this->dateFormat( $format );
+ if( $datePreference == MW_DATE_ISO ) {
+ return parent::date( $ts, $adj, $datePreference, $timecorrection );
+ } else {
+ if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); } # Adjust based on the timezone setting.
+ // 20050310001506 => 10.03.2005
+ $date = (substr( $ts, 6, 2 )) . '.' . substr( $ts, 4, 2 ) . '.' . substr( $ts, 0, 4 );
+ return $date;
+ }
}
function getMessage( $key ) {
return $wgSkinNamesCa;
}
-
- function shortdate( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . " " .$this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . ", " .
- substr( $ts, 0, 4 );
- return $d;
- }
-
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . " de " .$this->getMonthName( substr( $ts, 4, 2 ) ) . ", " .
- substr( $ts, 0, 4 );
- return $d;
- }
-
- function time( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
- return $t;
- }
-
- function timeanddate( $ts, $adj = false ) {
- return $this->time( $ts, $adj ) . " " . $this->shortdate( $ts, $adj );
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
}
function getMessage( $key ) {
# Datové a časové funkce možno upřesnit podle jazyka
# TODO: Umožnit nastavování formátu data a času.
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . '. ' .
- $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- ' ' .
- substr( $ts, 0, 4 );
- return $d;
+ function formatMonth( $month, $format ) {
+ return intval( $month ) . '.';
+ }
+
+ function formatDay( $day, $format ) {
+ return intval( $day ) . '.';
}
function getMessage( $key ) {
global $wgSkinNamesDe;
return $wgSkinNamesDe;
}
-
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . ". " .
- $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- " " .
- substr( $ts, 0, 4 );
- return $d;
+
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
+ }
+
+ function formatDay( $day, $format ) {
+ return parent::formatDay( $day, $format ) . '.';
}
function getMessage( $key ) {
}
# La dato- kaj tempo-funkciojn oni povas precizigi laŭ lingvo
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . '. ' .
- $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- ' ' .
- substr( $ts, 0, 4 );
- return $d;
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
+ }
+
+ function formatDay( $day, $format ) {
+ return parent::formatDay( $day, $format ) . '.';
}
function getMessage( $key ) {
global $wgSkinNamesEs;
return $wgSkinNamesEs;
}
-
- function shortdate( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . " " .$this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . ", " .
- substr( $ts, 0, 4 );
- return $d;
- }
-
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . " de " .$this->getMonthName( substr( $ts, 4, 2 ) ) . ", " .
- substr( $ts, 0, 4 );
- return $d;
+
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
}
-
- function time( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
- return $t;
- }
-
- function timeanddate( $ts, $adj = false ) {
- return $this->time( $ts, $adj ) . " " . $this->shortdate( $ts, $adj );
+
+ function timeDateSeparator( $format ) {
+ return ' ';
}
+
function getMessage( $key ) {
global $wgAllMessagesEs;
"skin" => "Nahk",
"math" => "Valemite näitamine",
"dateformat" => "Kuupäeva formaat",
+'datedefault' => 'Eelistus puudub',
"math_failure" => "Arusaamatu süntaks",
"math_unknown_error" => "Tundmatu viga",
"math_unknown_function" => "Tundmatu funktsioon ",
'skin' => 'Ulkonäkö',
'math' => 'Matematiikka',
'dateformat' => 'Päiväyksen muoto',
+'datedefault' => 'Ei valintaa',
'datetime' => 'Aika ja päiväys',
'math_failure' => 'Jäsentäminen epäonnistui',
'math_unknown_error' => 'Tuntematon virhe',
'chapitre.com' => 'http://www.chapitre.com/frame_rec.asp?isbn=$1',
);
-
/* private */ $wgAllMessagesFr = array(
# User Toggles
global $wgSkinNamesFr;
return $wgSkinNamesFr;
}
-
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . ' ' .
- $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- ' ' . substr( $ts, 0, 4 );
- return $d;
+
+ function timeBeforeDate( $format ) {
+ return false;
}
-
- function timeanddate( $ts, $adj = false ) {
- return $this->date( $ts, $adj ) . ' à ' . $this->time( $ts, $adj );
+
+ function timeDateSeparator( $format ) {
+ return " à ";
}
var $digitTransTable = array(
"skin" => "Side-oansjen",
"math" => "Formules",
"dateformat" => "Datum",
+'datedefault' => 'Gjin foarkar',
"math_failure" => "Untsjutbere formule",
"math_unknown_error" => "Unbekinde fout",
"math_unknown_function" => "Unbekinde funksje",
"skin" => "Craiceann",
"math" => "Ag aistriú na matamaitice",
"dateformat" => "Formáid dáta",
+'datedefault' => 'Is cuma liom',
"math_failure" => "Theip anailís an fhoirmle",
"math_unknown_error" => "earráid anaithnid",
"math_unknown_function" => "foirmle anaithnid ",
return $wgSkinNamesIa;
}
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- " " . (0 + substr( $ts, 6, 2 )) . ", " .
- substr( $ts, 0, 4 );
- return $d;
- }
-
- function timeanddate( $ts, $adj = false ) {
- return $this->time( $ts, $adj ) . " " . $this->date( $ts, $adj );
- }
-
function getMessage( $key ) {
global $wgAllMessagesIa, $wgAllMessagesEn;
$m = $wgAllMessagesIa[$key];
'currentrevisionlink' => "núverandi útgáfa",
'databaseerror' => "Gagnagrunnsvilla",
'dateformat' => "Tímasnið",
+'datedefault' => 'Sjálfgefið',
'deadendpages' => "Botnlangar",
'debug' => "Aflúsa",
'dec' => "des",
global $wgQuickbarSettingsIt;
return $wgQuickbarSettingsIt;
}
-
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- " " . (0 + substr( $ts, 6, 2 )) . ", " .
- substr( $ts, 0, 4 );
- return $d;
+
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
}
function getMessage( $key ) {
'skin' => '外装',
'math' => '数式の表記方法',
'dateformat' => '日付の書式',
+'datedefault' => '2001年1月15日 16:12 (デフォルト)',
'math_failure' => '構文解析失敗',
'math_unknown_error' => '不明なエラー',
'math_unknown_function' => '不明な関数',
global $wgSkinNamesKo;
return $wgSkinNamesKo;
}
+
+ function getDateFormats() {
+ return false;
+ }
function date( $ts, $adj = false ) {
global $wgWeekdayAbbreviationsKo;
return $wgSkinNamesLa;
}
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- " " . (0 + substr( $ts, 6, 2 )) . ", " .
- substr( $ts, 0, 4 );
- return $d;
- }
-
- function timeanddate( $ts, $adj = false ) {
- return $this->time( $ts, $adj ) . " " . $this->date( $ts, $adj );
- }
-
function getMessage( $key ) {
global $wgAllMessagesLa;
if( isset( $wgAllMessagesLa[$key] ) ) {
global $wgSkinNamesLi;
return $wgSkinNamesLi;
}
-
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . " " .
- $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " .
- substr( $ts, 0, 4 );
- return $d;
+
+ function timeBeforeDate( $format ) {
+ return false;
}
-
- function timeanddate( $ts, $adj = false ) {
- return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj );
+
+ function timeDateSeparator( $format ) {
+ return ' ';
}
-
+
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
+ }
+
function getMessage( $key ) {
global $wgAllMessagesLi;
if( isset( $wgAllMessagesLi[$key] ) ) {
return $wgSkinNamesNds;
}
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . '. ' .
- $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- ' ' .
- substr( $ts, 0, 4 );
- return $d;
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
+ }
+
+ function formatDay( $day, $format ) {
+ return parent::formatDay( $day, $format ) . '.';
}
function getMessage( $key ) {
return $wgSkinNamesNl;
}
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . " " .
- $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " .
- substr( $ts, 0, 4 );
- return $d;
+ function timeBeforeDate( $format ) {
+ return false;
}
-
- function timeanddate( $ts, $adj = false ) {
- return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj );
+
+ function timeDateSeparator( $format ) {
+ return ' ';
}
-
+
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
+ }
+
function getMessage( $key ) {
global $wgAllMessagesNl;
if( isset( $wgAllMessagesNl[$key] ) ) {
'skin' => 'Drakt',
'math' => 'Matematiske formlar',
'dateformat' => 'Datoformat',
+'datedefault' => 'Standard',
'math_failure' => 'Klarte ikkje å tolke formelen',
'math_unknown_error' => 'ukjend feil',
'math_unknown_function' => 'ukjend funksjon ',
global $wgSkinNamesNo;
return $wgSkinNamesNo;
}
-
-
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . ". " .
- $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " .
- substr( $ts, 0, 4 );
- return $d;
+
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
}
-
- function time( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
- return $t;
+
+ function formatDay( $day, $format ) {
+ return parent::formatDay( $day, $format ) . '.';
}
-
- function timeanddate( $ts, $adj = false ) {
- return $this->date( $ts, $adj ) . " kl." . $this->time( $ts, $adj );
+
+ function timeanddate( $ts, $adj = false, $format = false, $timecorrection = false ) {
+ $format = $this->dateFormat( $format );
+ if( $format == MW_DATE_ISO ) {
+ return parent::timeanddate( $ts, $adj, $format, $timecorrection );
+ } else {
+ return $this->date( $ts, $adj, $format, $timecorrection ) .
+ " kl." .
+ $this->time( $ts, $adj, $format, $timecorrection );
+ }
}
function formatNum( $number ) {
return $wgSkinNamesOc;
}
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . " " .
- $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- " " . substr( $ts, 0, 4 );
- return $d;
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
}
-
- function timeanddate( $ts, $adj = false ) {
- return $this->date( $ts, $adj ) . " à " . $this->time( $ts, $adj );
+
+ function timeBeforeDate( $format ) {
+ return false;
+ }
+
+ function timeDateSeparator( $format ) {
+ return " à ";
}
function getMessage( $key ) {
global $wgMonthNamesGenEn;
return wfMsg( $wgMonthNamesGenEn[$key-1] );
}
-
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) .
- " " . $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- " " . substr( $ts, 0, 4 );
- return $d;
+
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
}
function getMessage( $key ) {
'skin' => 'Tema',
'math' => 'Matemática',
'dateformat' => 'Formato da data',
+'datedefault' => 'Sem preferência',
'datetime' => 'Data e hora',
'math_failure' => 'Falhou ao verificar gramática',
'math_unknown_error' => 'Erro desconhecido',
return $wgQuickbarSettingsSc;
}
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
- " " . (0 + substr( $ts, 6, 2 )) . ", " .
- substr( $ts, 0, 4 );
- return $d;
+ function formatMonth( $month, $format ) {
+ return $this->getMonthAbbreviation( $month );
}
function getMessage( $key ) {
'skin' => 'Vzhľad',
'math' => 'Matematika',
'dateformat' => 'Formát dátumu',
+'datedefault' => 'Default',
'math_failure' => 'Syntaktická analýza (parsing) neúspešná',
'math_unknown_error' => 'neznáma chyba',
'math_unknown_function' => 'neznáma funkcia ',
'data' => 'Подаци',
'databaseerror' => 'Грешка у бази',
'dateformat' => 'Формат датума',
+'datedefault' => 'Није битно',
'dberrortext' => 'Десила се синтаксна грешка упита базе.
Ово је могуће због илегалног упита,
или могуће грешке у софтверу.
return $wgSkinNamesSv;
}
- function date( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $d = (0 + substr( $ts, 6, 2 )) . " " .
- $this->getMonthName( substr( $ts, 4, 2 ) ) . " " .
- substr( $ts, 0, 4 );
- return $d;
- }
-
// "." is used as the character to separate the
// hours from the minutes in the date output
- function time( $ts, $adj = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
- $t = substr( $ts, 8, 2 ) . "." . substr( $ts, 10, 2 );
- return $t;
+ function timeSeparator() {
+ return '.';
}
- function timeanddate( $ts, $adj = false ) {
- return $this->date( $ts, $adj ) . " kl." . $this->time( $ts, $adj );
+ function timeanddate( $ts, $adj = false, $format = false, $timecorrection = false ) {
+ $format = $this->dateFormat( $format );
+ if( $format == MW_DATE_ISO ) {
+ return parent::timeanddate( $ts, $adj, $format, $timecorrection );
+ } else {
+ return $this->date( $ts, $adj, $format, $timecorrection ) .
+ " kl." .
+ $this->time( $ts, $adj, $format, $timecorrection );
+ }
}
function getMessage( $key ) {
'currentrev' => 'Güncel sürüm',
'currentrevisionlink' => 'en güncel halini göster',
'dateformat' => 'Tarih gösterimi',
+'datedefault' => 'Tercih yok',
'datetime' => 'Tarih ve saat',
'deadendpages' => 'Başka sayfalara bağlantısı olmayan sayfalar',
'default' => 'orjinal',
'skin' => 'Ngoại hình',
'math' => 'Công thức toán',
'dateformat' => 'Ngày tháng',
+'datedefault' => 'Không lựa chọn',
'math_failure' => 'Lỗi toán',
'math_unknown_error' => 'lỗi chưa rõ',
'math_unknown_function' => 'hàm chưa rõ',
global $wgSkinNamesZh_cn;
return $wgSkinNamesZh_cn;
}
+
+ function getDateFormats() {
+ return false;
+ }
function date( $ts, $adj = false ) {
if ( $adj ) { $ts = $this->userAdjust( $ts ); }