Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@piwik.org>2017-07-17 00:49:20 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-07-17 00:49:20 +0300
commitb0546878bd83d5ca36d43a8db8ac903d8548dec1 (patch)
tree6426400bbe899b0add2214bb5e5ae7761a0b3bd5 /core/Date.php
parentb9c953e43758815f016e11b96c9e7f6a303a8691 (diff)
Use localized format to display hour in Visits per time reports (#11747)
* Use localized format to display hour in Visits per time reports * updates cldr data * update test files
Diffstat (limited to 'core/Date.php')
-rw-r--r--core/Date.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/Date.php b/core/Date.php
index dd2051a1a0..64583c9814 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -725,6 +725,14 @@ class Date
return $this->toString('h');
case "h":
return $this->toString('g');
+ case "KK": // 00 .. 11
+ return str_pad($this->toString('g') - 1, 2, '0');
+ case "K": // 0 .. 11
+ return $this->toString('g') - 1;
+ case "kk": // 01 .. 24
+ return str_pad($this->toString('G') + 1, 2, '0');
+ case "k": // 1 .. 24
+ return $this->toString('G') + 1;
// minute
case "mm":
case "m":
@@ -755,7 +763,7 @@ class Date
}
protected static $tokens = array(
- 'G', 'y', 'M', 'L', 'd', 'h', 'H', 'm', 's', 'E', 'c', 'e', 'D', 'F', 'w', 'W', 'a', 'z', 'Z', 'v',
+ 'G', 'y', 'M', 'L', 'd', 'h', 'H', 'k', 'K', 'm', 's', 'E', 'c', 'e', 'D', 'F', 'w', 'W', 'a', 'z', 'Z', 'v',
);
/**