summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2013-06-24 06:59:16 +0000
committerfisharebest <fisharebest@gmail.com>2013-06-24 06:59:16 +0000
commitd6b92ab74064e6b4e6720d7a20049c764f378775 (patch)
treec7b6584850f437831191d98c0b2865c37ab76520 /library
parenta314ecb2d333ae17a96a7885f8699fa4f218e5ff (diff)
downloadwebtrees-d6b92ab74064e6b4e6720d7a20049c764f378775.tar.gz
webtrees-d6b92ab74064e6b4e6720d7a20049c764f378775.tar.bz2
webtrees-d6b92ab74064e6b4e6720d7a20049c764f378775.zip
Variable name mis-match in calendar classes
Diffstat (limited to 'library')
-rw-r--r--library/WT/Date/Calendar.php28
-rw-r--r--library/WT/Date/French.php12
-rw-r--r--library/WT/Date/Jewish.php2
3 files changed, 21 insertions, 21 deletions
diff --git a/library/WT/Date/Calendar.php b/library/WT/Date/Calendar.php
index 6b59fce5e7..cfd4ccb44a 100644
--- a/library/WT/Date/Calendar.php
+++ b/library/WT/Date/Calendar.php
@@ -36,12 +36,12 @@ if (!defined('WT_WEBTREES')) {
}
class WT_Date_Calendar {
- const CALENDAR_ESCAPE = '@#DUNKNOWN@';
- const NUM_MONTHS = 12;
- const CAL_START_JD = 0; // @#DJULIAN@ 01 JAN 4713B.C.
- const CAL_END_JD = 99999999;
- const NUM_DAYS_OF_WEEK = 7;
- static $MONTH_ABBREV = array(
+ const CALENDAR_ESCAPE = '@#DUNKNOWN@';
+ const MONTHS_IN_YEAR = 12;
+ const CAL_START_JD = 0; // @#DJULIAN@ 01 JAN 4713B.C.
+ const CAL_END_JD = 99999999;
+ const DAYS_IN_WEEK = 7;
+ static $MONTH_ABBREV = array(
''=>0, 'JAN'=>1, 'FEB'=>2, 'MAR'=>3, 'APR'=>4, 'MAY'=>5, 'JUN'=>6, 'JUL'=>7, 'AUG'=>8, 'SEP'=>9, 'OCT'=>10, 'NOV'=>11, 'DEC'=>12
);
@@ -283,7 +283,7 @@ class WT_Date_Calendar {
$dm--;
}
if ($dm<0) {
- $dm+=static::NUM_MONTHS;
+ $dm+=static::MONTHS_IN_YEAR;
$dy--;
}
// Not a full age? Then just the years
@@ -292,7 +292,7 @@ class WT_Date_Calendar {
// Age in years?
if ($dy>1)
return $dy.'y';
- $dm+=$dy*static::NUM_MONTHS;
+ $dm+=$dy*static::MONTHS_IN_YEAR;
// Age in months?
if ($dm>1)
return $dm.'m';
@@ -338,7 +338,7 @@ class WT_Date_Calendar {
// How many days in the current week
public function DaysInWeek() {
- return static::NUM_DAYS_OF_WEEK;
+ return static::DAYS_IN_WEEK;
}
// Format a date
@@ -422,11 +422,11 @@ class WT_Date_Calendar {
}
private function FormatLongWeekday() {
- return $this->LONG_DAYS_OF_WEEK($this->minJD % static::NUM_DAYS_OF_WEEK);
+ return $this->LONG_DAYS_OF_WEEK($this->minJD % static::DAYS_IN_WEEK);
}
private function FormatShortWeekday() {
- return $this->SHORT_DAYS_OF_WEEK($this->minJD % static::NUM_DAYS_OF_WEEK);
+ return $this->SHORT_DAYS_OF_WEEK($this->minJD % static::DAYS_IN_WEEK);
}
private function FormatISOWeekday() {
@@ -442,7 +442,7 @@ class WT_Date_Calendar {
}
private function FormatNumericWeekday() {
- return WT_I18N::digits(($this->minJD + 1) % static::NUM_DAYS_OF_WEEK);
+ return WT_I18N::digits(($this->minJD + 1) % static::DAYS_IN_WEEK);
}
private function FormatDayOfYear() {
@@ -507,8 +507,8 @@ class WT_Date_Calendar {
// Calendars with leap-months should redefine this.
private function NextMonth() {
return array(
- $this->m==static::NUM_MONTHS ? $this->NextYear($this->y) : $this->y,
- ($this->m % static::NUM_MONTHS)+1
+ $this->m==static::MONTHS_IN_YEAR ? $this->NextYear($this->y) : $this->y,
+ ($this->m % static::MONTHS_IN_YEAR)+1
);
}
diff --git a/library/WT/Date/French.php b/library/WT/Date/French.php
index 1dc7e003b7..481791b32f 100644
--- a/library/WT/Date/French.php
+++ b/library/WT/Date/French.php
@@ -32,12 +32,12 @@ if (!defined('WT_WEBTREES')) {
}
class WT_Date_French extends WT_Date_Calendar {
- const CALENDAR_ESCAPE = '@#DFRENCH R@';
- const NUM_MONTHS = 13;
- const CAL_START_JD = 2375840; // 22 SEP 1792 = 01 VEND 0001
- const CAL_END_JD = 2380687; // 31 DEC 1805 = 10 NIVO 0014
- const NUM_DAYS_OF_WEEK = 10; // A metric week of 10 unimaginatively named days.
- static $MONTH_ABBREV = array(
+ const CALENDAR_ESCAPE = '@#DFRENCH R@';
+ const MONTHS_IN_YEAR = 13;
+ const CAL_START_JD = 2375840; // 22 SEP 1792 = 01 VEND 0001
+ const CAL_END_JD = 2380687; // 31 DEC 1805 = 10 NIVO 0014
+ const DAYS_IN_WEEK = 10; // A metric week of 10 unimaginatively named days.
+ static $MONTH_ABBREV = array(
''=>0, 'VEND'=>1, 'BRUM'=>2, 'FRIM'=>3, 'NIVO'=>4, 'PLUV'=>5, 'VENT'=>6, 'GERM'=>7, 'FLOR'=>8, 'PRAI'=>9, 'MESS'=>10, 'THER'=>11, 'FRUC'=>12, 'COMP'=>13
);
diff --git a/library/WT/Date/Jewish.php b/library/WT/Date/Jewish.php
index f3c1a46da4..a2e0949b3b 100644
--- a/library/WT/Date/Jewish.php
+++ b/library/WT/Date/Jewish.php
@@ -33,7 +33,7 @@ if (!defined('WT_WEBTREES')) {
class WT_Date_Jewish extends WT_Date_Calendar {
const CALENDAR_ESCAPE = '@#DHEBREW@';
- const NUM_MONTHS = 13;
+ const MONTHS_IN_YEAR = 13;
const CAL_START_JD = 347998; // 01 TSH 0001 = @#JULIAN@ 7 OCT 3761B.C.
static $MONTH_ABBREV = array(
''=>0, 'TSH'=>1, 'CSH'=>2, 'KSL'=>3, 'TVT'=>4, 'SHV'=>5, 'ADR'=>6, 'ADS'=>7, 'NSN'=>8, 'IYR'=>9, 'SVN'=>10, 'TMZ'=>11, 'AAV'=>12, 'ELL'=>13