From 37b78bb39f19823984cd07b4467b8ea67d68c95c Mon Sep 17 00:00:00 2001 From: mattpiwik Date: Sun, 16 Jan 2011 11:39:35 +0000 Subject: Fixes #1888 Note: Year Period is not toStringable - does it still solve your use case? git-svn-id: http://dev.piwik.org/svn/trunk@3755 59fd770c-687e-43c8-a1e3-f5a4ff64c105 --- core/Period.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/Period.php') diff --git a/core/Period.php b/core/Period.php index 1d7b9d397f..ca97fd902c 100644 --- a/core/Period.php +++ b/core/Period.php @@ -186,7 +186,7 @@ abstract class Piwik_Period $this->subperiods[] = $date; } - public function toString() + public function toString($format = "Y-m-d") { if(!$this->subperiodsProcessed) { @@ -195,7 +195,7 @@ abstract class Piwik_Period $dateString = array(); foreach($this->subperiods as $period) { - $dateString[] = $period->toString(); + $dateString[] = $period->toString($format); } return $dateString; } -- cgit v1.2.3