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:
authorsgiehl <stefangiehl@gmail.com>2012-05-24 01:19:25 +0400
committersgiehl <stefangiehl@gmail.com>2012-05-24 01:19:25 +0400
commitf419aca5cae09792f879e5570c51da699d658599 (patch)
treed67c5aa457067a17e031c44309f20292eaaa1d8d /core/Date.php
parent145bd36f2bc1183442415ea3f0d2fc42970be207 (diff)
completed a bunch of php doc blocks
git-svn-id: http://dev.piwik.org/svn/trunk@6300 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Date.php')
-rw-r--r--core/Date.php23
1 files changed, 16 insertions, 7 deletions
diff --git a/core/Date.php b/core/Date.php
index 35c5d29b3c..b30d03dce2 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -20,7 +20,9 @@ class Piwik_Date
/**
* Builds a Piwik_Date object
*
- * @param int timestamp
+ * @param int $timestamp
+ * @param string $timezone
+ * @throws Exception
*/
protected function __construct( $timestamp, $timezone = 'UTC')
{
@@ -36,10 +38,11 @@ class Piwik_Date
/**
* Returns a Piwik_Date objects.
*
- * @param string $strDate 'today' 'yesterday' or any YYYY-MM-DD or timestamp
+ * @param string $dateString 'today' 'yesterday' or any YYYY-MM-DD or timestamp
* @param string $timezone if specified, the dateString will be relative to this $timezone.
- * For example, today in UTC+12 will be a timestamp in the future for UTC.
+ * For example, today in UTC+12 will be a timestamp in the future for UTC.
* This is different from using ->setTimezone()
+ * @throws Exception
* @return Piwik_Date
*/
static public function factory($dateString, $timezone = null)
@@ -321,7 +324,7 @@ class Piwik_Date
* Returns 0 if equal, -1 if current month is earlier or 1 if current month is later
* For example: 10.03.2000 -> 15.03.1950 -> 0
*
- * @param Piwik_Date $month Month to compare
+ * @param Piwik_Date $date Month to compare
* @return integer 0 = equal, 1 = later, -1 = earlier
*/
function compareMonth( Piwik_Date $date )
@@ -450,6 +453,7 @@ class Piwik_Date
* Returned is the new date object
* Doesn't modify $this
*
+ * @param $n
* @return Piwik_Date new date
*/
public function subDay( $n )
@@ -461,12 +465,13 @@ class Piwik_Date
$ts = strtotime("-$n day", $this->timestamp);
return new Piwik_Date( $ts, $this->timezone );
}
-
+
/**
* Subtracts weeks from the existing date object and returns a new Piwik_Date object
* Returned is the new date object
* Doesn't modify $this
*
+ * @param $n
* @return Piwik_Date new date
*/
public function subWeek( $n )
@@ -479,6 +484,7 @@ class Piwik_Date
* Returned is the new date object
* Doesn't modify $this
*
+ * @param $n
* @return Piwik_Date new date
*/
public function subMonth( $n )
@@ -504,6 +510,7 @@ class Piwik_Date
* Returned is the new date object
* Doesn't modify $this
*
+ * @param $n
* @return Piwik_Date new date
*/
public function subYear( $n )
@@ -633,7 +640,8 @@ class Piwik_Date
* Returned is the new date object
* Doesn't modify $this
*
- * @param int Number of period to add
+ * @param $n
+ * @param $period period to add
* @return Piwik_Date new date
*/
public function addPeriod( $n, $period )
@@ -654,7 +662,8 @@ class Piwik_Date
* Returned is the new date object
* Doesn't modify $this
*
- * @param int Number of period to sub
+ * @param $n
+ * @param $period period to sub
* @return Piwik_Date new date
*/
public function subPeriod( $n, $period )