From ca9c3bd8f12d58be863278679493ea259eb7a39a Mon Sep 17 00:00:00 2001 From: Meritoo Date: Fri, 19 Oct 2018 22:54:11 +0200 Subject: [PATCH] Utilities > Date > update descriptions of methods --- CHANGELOG.md | 1 + src/Utilities/Date.php | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d3daf2..9484473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Common and useful classes, methods, exceptions etc. # 0.1.4 1. Phing > update configuration +2. Utilities > Date > update descriptions of methods # 0.1.3 diff --git a/src/Utilities/Date.php b/src/Utilities/Date.php index 40b76db..3b296b7 100644 --- a/src/Utilities/Date.php +++ b/src/Utilities/Date.php @@ -64,8 +64,7 @@ class Date const DATE_DIFFERENCE_UNIT_YEARS = 'years'; /** - * Returns start and end date for given period. - * The dates are returned in an array with indexes 'start' and 'end'. + * Returns date's period (that contains start and end date) for given period * * @param int $period The period, type of period. One of DatePeriod class constants, e.g. DatePeriod::LAST_WEEK. * @throws Exception @@ -531,11 +530,15 @@ class Date /** * Returns random date based on given start date * - * @param DateTime $startDate The start date. Start of the random date. - * @param int $start (optional) Start of random partition - * @param int $end (optional) End of random partition + * @param DateTime $startDate (optional) Beginning of the random date. If not provided, current date will + * be used (default behaviour). + * @param int $start (optional) Start of random partition. If not provided, 1 will be used + * (default behaviour). + * @param int $end (optional) End of random partition. If not provided, 100 will be used + * (default behaviour). * @param string $intervalTemplate (optional) Template used to build date interval. The placeholder is replaced - * with next, iterated value. + * with next, iterated value. If not provided, "P%sD" will be used (default + * behaviour). * @throws Exception * @return DateTime */