Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #313 from shama/patch-timehelper

Add missing @link to TimeHelper docblocks and correct @return
  • Loading branch information...
commit a5d497068ba8ca86f58a99e5be2d920e85fecc16 2 parents 7d756fd + 7df3252
@lorenzo lorenzo authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/Cake/View/Helper/TimeHelper.php
View
8 lib/Cake/View/Helper/TimeHelper.php
@@ -61,6 +61,7 @@ public function __construct(View $View, $settings = array()) {
* Accepts the special specifier %S which mimics th modifier S for date()
* @param string $time UNIX timestamp
* @return string windows safe and date() function compatible format for strftime
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting
*/
public function convertSpecifiers($format, $time = null) {
if (!$time) {
@@ -172,7 +173,8 @@ protected function _translateSpecifier($specifier) {
*
* @param string $serverTime UNIX timestamp
* @param integer $userOffset User's offset from GMT (in hours)
- * @return string UNIX timestamp
+ * @return integer UNIX timestamp
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting
*/
public function convert($serverTime, $userOffset) {
$serverOffset = $this->serverOffset();
@@ -185,6 +187,7 @@ public function convert($serverTime, $userOffset) {
* Returns server's offset from GMT in seconds.
*
* @return integer Offset
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting
*/
public function serverOffset() {
return date('Z', time());
@@ -311,6 +314,7 @@ public function dayAsSql($dateString, $fieldName, $userOffset = null) {
* @param string $dateString Datetime string or Unix timestamp
* @param integer $userOffset User's offset from GMT (in hours)
* @return boolean True if datetime string is today
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#testing-time
*/
public function isToday($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
@@ -708,6 +712,7 @@ public function gmt($string = null) {
* @param boolean $invalid flag to ignore results of fromString == false
* @param integer $userOffset User's offset from GMT (in hours)
* @return string Formatted date string
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting
*/
public function format($format, $date = null, $invalid = false, $userOffset = null) {
$time = $this->fromString($date, $userOffset);
@@ -732,6 +737,7 @@ public function format($format, $date = null, $invalid = false, $userOffset = nu
* @param boolean $invalid flag to ignore results of fromString == false
* @param integer $userOffset User's offset from GMT (in hours)
* @return string Formatted and translated date string
+ * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/time.html#formatting
*/
public function i18nFormat($date, $format = null, $invalid = false, $userOffset = null) {
$date = $this->fromString($date, $userOffset);
Please sign in to comment.
Something went wrong with that request. Please try again.