|
|
@@ -60,7 +60,7 @@ class TimeHelper extends AppHelper {
|
|
|
*
|
|
|
* @param string $format Format with specifiers for strftime function.
|
|
|
* Accepts the special specifier %S which mimics th modifier S for date()
|
|
|
- * @param string UNIX timestamp
|
|
|
+ * @param string $time UNIX timestamp
|
|
|
* @return string windows safe and date() function compatible format for strftime
|
|
|
*/
|
|
|
public function convertSpecifiers($format, $time = null) {
|
|
|
@@ -279,7 +279,7 @@ class TimeHelper extends AppHelper {
|
|
|
/**
|
|
|
* Returns a partial SQL string to search for all records between two dates.
|
|
|
*
|
|
|
- * @param string $dateString Datetime string or Unix timestamp
|
|
|
+ * @param string $begin Datetime string or Unix timestamp
|
|
|
* @param string $end Datetime string or Unix timestamp
|
|
|
* @param string $fieldName Name of database field to compare with
|
|
|
* @param int $userOffset User's offset from GMT (in hours)
|
|
|
@@ -343,7 +343,6 @@ class TimeHelper extends AppHelper {
|
|
|
* @param string $dateString
|
|
|
* @param int $userOffset User's offset from GMT (in hours)
|
|
|
* @return boolean True if datetime string is within current month
|
|
|
- * @access public
|
|
|
* @link http://book.cakephp.org/view/1472/Testing-Time
|
|
|
*/
|
|
|
public function isThisMonth($dateString, $userOffset = null) {
|
|
|
@@ -355,8 +354,8 @@ class TimeHelper extends AppHelper {
|
|
|
* Returns true if given datetime string is within current year.
|
|
|
*
|
|
|
* @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 within current year
|
|
|
- * @access public
|
|
|
* @link http://book.cakephp.org/view/1472/Testing-Time
|
|
|
*/
|
|
|
public function isThisYear($dateString, $userOffset = null) {
|
|
|
@@ -370,7 +369,6 @@ class TimeHelper extends AppHelper {
|
|
|
* @param string $dateString Datetime string or Unix timestamp
|
|
|
* @param int $userOffset User's offset from GMT (in hours)
|
|
|
* @return boolean True if datetime string was yesterday
|
|
|
- * @access public
|
|
|
* @link http://book.cakephp.org/view/1472/Testing-Time
|
|
|
*
|
|
|
*/
|
|
|
@@ -385,7 +383,6 @@ class TimeHelper extends AppHelper {
|
|
|
* @param string $dateString Datetime string or Unix timestamp
|
|
|
* @param int $userOffset User's offset from GMT (in hours)
|
|
|
* @return boolean True if datetime string was yesterday
|
|
|
- * @access public
|
|
|
* @link http://book.cakephp.org/view/1472/Testing-Time
|
|
|
*/
|
|
|
public function isTomorrow($dateString, $userOffset = null) {
|
|
|
@@ -399,7 +396,6 @@ class TimeHelper extends AppHelper {
|
|
|
* @param string $dateString
|
|
|
* @param boolean $range if true returns a range in Y-m-d format
|
|
|
* @return boolean True if datetime string is within current week
|
|
|
- * @access public
|
|
|
* @link http://book.cakephp.org/view/1471/Formatting
|
|
|
*/
|
|
|
public function toQuarter($dateString, $range = false) {
|
|
|
@@ -492,10 +488,9 @@ class TimeHelper extends AppHelper {
|
|
|
* The returned string includes 'ago' or 'on' and assumes you'll properly add a word
|
|
|
* like 'Posted ' before the function output.
|
|
|
*
|
|
|
- * @param string $dateString Datetime string or Unix timestamp
|
|
|
+ * @param string $dateTime Datetime string or Unix timestamp
|
|
|
* @param array $options Default format if timestamp is used in $dateString
|
|
|
* @return string Relative time string.
|
|
|
- * @access public
|
|
|
* @link http://book.cakephp.org/view/1471/Formatting
|
|
|
*/
|
|
|
public function timeAgoInWords($dateTime, $options = array()) {
|
|
|
@@ -684,9 +679,8 @@ class TimeHelper extends AppHelper {
|
|
|
/**
|
|
|
* Returns gmt, given either a UNIX timestamp or a valid strtotime() date string.
|
|
|
*
|
|
|
- * @param string $dateString Datetime string
|
|
|
+ * @param string $string Datetime string
|
|
|
* @return string Formatted date string
|
|
|
- * @access public
|
|
|
* @link http://book.cakephp.org/view/1471/Formatting
|
|
|
*/
|
|
|
public function gmt($string = null) {
|
|
|
@@ -712,9 +706,9 @@ class TimeHelper extends AppHelper {
|
|
|
* In that case this function behaves as a wrapper for TimeHelper::i18nFormat()
|
|
|
*
|
|
|
* @param string $format date format string (or a DateTime string)
|
|
|
- * @param string $dateString Datetime string (or a date format string)
|
|
|
+ * @param string $date Datetime string (or a date format string)
|
|
|
* @param boolean $invalid flag to ignore results of fromString == false
|
|
|
- * @param int $userOffset User's offset from GMT (in hours)
|
|
|
+ * @param integer $userOffset User's offset from GMT (in hours)
|
|
|
* @return string Formatted date string
|
|
|
*/
|
|
|
public function format($format, $date = null, $invalid = false, $userOffset = null) {
|
|
|
@@ -735,7 +729,7 @@ class TimeHelper extends AppHelper {
|
|
|
* Returns a formatted date string, given either a UNIX timestamp or a valid strtotime() date string.
|
|
|
* It take in account the default date format for the current language if a LC_TIME file is used.
|
|
|
*
|
|
|
- * @param string $dateString Datetime string
|
|
|
+ * @param string $date Datetime string
|
|
|
* @param string $format strftime format string.
|
|
|
* @param boolean $invalid flag to ignore results of fromString == false
|
|
|
* @param int $userOffset User's offset from GMT (in hours)
|