summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-05 22:11:42 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-05 22:11:42 +0200
commitdc9bfb7ffbbd53fa4ad0c22c8c42300dd882ecca (patch)
treeb156ecf867856a0d88dacc3f32c35bafc85fb054 /user_guide_src/source/helpers
parentdbad54e09a39a77c7404dee9ca1a6b34299469d0 (diff)
parent0df3585eec575d2d2e7d17c5339ed219a33dfde8 (diff)
Merge pull request #918 from narfbg/develop-dh-date-range
Added date_range() to the Date helper
Diffstat (limited to 'user_guide_src/source/helpers')
-rw-r--r--user_guide_src/source/helpers/date_helper.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst
index e332a913f..9de925ba7 100644
--- a/user_guide_src/source/helpers/date_helper.rst
+++ b/user_guide_src/source/helpers/date_helper.rst
@@ -306,6 +306,30 @@ Example
If the second parameter is empty, the current year will be used.
+date_range()
+============
+
+Returns a list of dates within a specified period.
+
+.. php:method:: date_range($unix_start = '', $mixed = '', $is_unix = TRUE, $format = 'Y-m-d')
+
+ :param integer $unix_start: UNIX timestamp of the range start date
+ :param integer $mixed: UNIX timestamp of the range end date or interval in days
+ :param boolean $is_unix: set to FALSE if $mixed is not a timestamp
+ :param string $format: output date format, same as in date()
+ :returns: array
+
+Example
+
+::
+
+ $range = date_range('2012-01-01', '2012-01-15');
+ echo "First 15 days of 2012:";
+ foreach ($range as $date)
+ {
+ echo $date."\n";
+ }
+
timezones()
===========