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:
authorMatthieu Aubry <mattab@users.noreply.github.com>2016-09-27 00:41:55 +0300
committerGitHub <noreply@github.com>2016-09-27 00:41:55 +0300
commit947a78cde33138640c9a670afb32ef85b71338f5 (patch)
tree1d3d871d39e08dc5c171a6b1e0b5734cd4526eb8 /core/Date.php
parent3b09e9abc1f255a3d14c7db98b49894bbab02096 (diff)
Various minor tweaks to 3.x (#10566)
* Remove code block height as it looks better to let the browser set height automatically (ie. no scroll bar) * Remove deprecated code * UI tests: nicer code block * select on focus the tracking code
Diffstat (limited to 'core/Date.php')
-rw-r--r--core/Date.php36
1 files changed, 0 insertions, 36 deletions
diff --git a/core/Date.php b/core/Date.php
index be099e792a..ad492eb6ea 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -621,8 +621,6 @@ class Date
*/
public function getLocalized($template)
{
- $template = $this->replaceLegacyPlaceholders($template);
-
$dateTimeFormatProvider = StaticContainer::get('Piwik\Intl\Data\Provider\DateTimeFormatProvider');
$template = $dateTimeFormatProvider->getFormatPattern($template);
@@ -643,40 +641,6 @@ class Date
return $out;
}
- /**
- * Replaces legacy placeholders
- *
- * @deprecated should be removed in Piwik 3.0.0 or later
- *
- * - **%day%**: replaced with the day of the month without leading zeros, eg, **1** or **20**.
- * - **%shortMonth%**: the short month in the current language, eg, **Jan**, **Feb**.
- * - **%longMonth%**: the whole month name in the current language, eg, **January**, **February**.
- * - **%shortDay%**: the short day name in the current language, eg, **Mon**, **Tue**.
- * - **%longDay%**: the long day name in the current language, eg, **Monday**, **Tuesday**.
- * - **%longYear%**: the four digit year, eg, **2007**, **2013**.
- * - **%shortYear%**: the two digit year, eg, **07**, **13**.
- * - **%time%**: the time of day, eg, **07:35:00**, or **15:45:00**.
- */
- protected function replaceLegacyPlaceholders($template)
- {
- if (strpos($template, '%') === false) {
- return $template;
- }
-
- $mapping = array(
- '%day%' => 'd',
- '%shortMonth%' => 'MMM',
- '%longMonth%' => 'MMMM',
- '%shortDay%' => 'EEE',
- '%longDay%' => 'EEEE',
- '%longYear%' => 'y',
- '%shortYear%' => 'yy',
- '%time%' => 'HH:mm:ss'
- );
-
- return str_replace(array_keys($mapping), array_values($mapping), $template);
- }
-
protected function formatToken($token)
{
$dayOfWeek = $this->toString('N');