The template should contain tags that will be replaced with localized date strings.
public getLocalized ( string $template ) : string | ||
$template | string | eg. `"MMM y"` |
Résultat | string | eg. `"Aug 2009"` |
/** * @param string $format * @param \Piwik\Date $dateStart * @param \Piwik\Date $dateEnd * * @return mixed */ protected static function getTranslatedRange($format, $dateStart, $dateEnd) { $string = str_replace('From%', '%', $format); $string = $dateStart->getLocalized($string); $string = str_replace('To%', '%', $string); $string = $dateEnd->getLocalized($string); return $string; }