Skip to content

Commit

Permalink
Add missing @link to TimeHelper docblocks and correct @return
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Nov 11, 2011
1 parent 7d756fd commit 7df3252
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Cake/View/Helper/TimeHelper.php
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
Expand All @@ -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());
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 7df3252

Please sign in to comment.