dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Convert Title::getTitleCache() to using MapCacheLRU"
[lhc/web/wiklou.git]
/
languages
/
Language.php
diff --git
a/languages/Language.php
b/languages/Language.php
index
deee2bc
..
9792095
100644
(file)
--- a/
languages/Language.php
+++ b/
languages/Language.php
@@
-1883,6
+1883,14
@@
class Language {
# Add 543 years to the Gregorian calendar
# Months and days are identical
$gy_offset = $gy + 543;
# Add 543 years to the Gregorian calendar
# Months and days are identical
$gy_offset = $gy + 543;
+ # fix for dates between 1912 and 1941
+ # https://en.wikipedia.org/?oldid=836596673#New_year
+ if ( $gy >= 1912 && $gy <= 1940 ) {
+ if ( $gm <= 3 ) {
+ $gy_offset--;
+ }
+ $gm = ( $gm - 3 ) % 12;
+ }
} elseif ( ( !strcmp( $cName, 'minguo' ) ) || !strcmp( $cName, 'juche' ) ) {
# Minguo dates
# Deduct 1911 years from the Gregorian calendar
} elseif ( ( !strcmp( $cName, 'minguo' ) ) || !strcmp( $cName, 'juche' ) ) {
# Minguo dates
# Deduct 1911 years from the Gregorian calendar
@@
-3489,6
+3497,7
@@
class Language {
* @return string
*/
function truncate( $string, $length, $ellipsis = '...', $adjustLength = true ) {
* @return string
*/
function truncate( $string, $length, $ellipsis = '...', $adjustLength = true ) {
+ wfDeprecated( __METHOD__, '1.31' );
return $this->truncateForDatabase( $string, $length, $ellipsis, $adjustLength );
}
return $this->truncateForDatabase( $string, $length, $ellipsis, $adjustLength );
}