@@ -85,23 +85,31 @@ public function __construct(
8585 }
8686
8787 /**
88- * {@inheritdoc}
88+ * Return path to default timezone
89+ *
90+ * @return string
8991 */
9092 public function getDefaultTimezonePath ()
9193 {
9294 return $ this ->_defaultTimezonePath ;
9395 }
9496
9597 /**
96- * {@inheritdoc}
98+ * Retrieve timezone code
99+ *
100+ * @return string
97101 */
98102 public function getDefaultTimezone ()
99103 {
100104 return 'UTC ' ;
101105 }
102106
103107 /**
104- * {@inheritdoc}
108+ * Gets the scope config timezone
109+ *
110+ * @param string $scopeType
111+ * @param string $scopeCode
112+ * @return string
105113 */
106114 public function getConfigTimezone ($ scopeType = null , $ scopeCode = null )
107115 {
@@ -113,7 +121,10 @@ public function getConfigTimezone($scopeType = null, $scopeCode = null)
113121 }
114122
115123 /**
116- * {@inheritdoc}
124+ * Retrieve ISO date format
125+ *
126+ * @param int $type
127+ * @return string
117128 */
118129 public function getDateFormat ($ type = \IntlDateFormatter::SHORT )
119130 {
@@ -125,7 +136,9 @@ public function getDateFormat($type = \IntlDateFormatter::SHORT)
125136 }
126137
127138 /**
128- * {@inheritdoc}
139+ * Retrieve short date format with 4-digit year
140+ *
141+ * @return string
129142 */
130143 public function getDateFormatWithLongYear ()
131144 {
@@ -137,7 +150,10 @@ public function getDateFormatWithLongYear()
137150 }
138151
139152 /**
140- * {@inheritdoc}
153+ * Retrieve ISO time format
154+ *
155+ * @param string $type
156+ * @return string
141157 */
142158 public function getTimeFormat ($ type = \IntlDateFormatter::SHORT )
143159 {
@@ -149,15 +165,24 @@ public function getTimeFormat($type = \IntlDateFormatter::SHORT)
149165 }
150166
151167 /**
152- * {@inheritdoc}
168+ * Retrieve ISO datetime format
169+ *
170+ * @param string $type
171+ * @return string
153172 */
154173 public function getDateTimeFormat ($ type )
155174 {
156175 return $ this ->getDateFormat ($ type ) . ' ' . $ this ->getTimeFormat ($ type );
157176 }
158177
159178 /**
160- * {@inheritdoc}
179+ * Create \DateTime object for current locale
180+ *
181+ * @param mixed $date
182+ * @param string $locale
183+ * @param bool $useTimezone
184+ * @param bool $includeTime
185+ * @return \DateTime
161186 */
162187 public function date ($ date = null , $ locale = null , $ useTimezone = true , $ includeTime = true )
163188 {
@@ -191,7 +216,12 @@ public function date($date = null, $locale = null, $useTimezone = true, $include
191216 }
192217
193218 /**
194- * {@inheritdoc}
219+ * Create \DateTime object with date converted to scope timezone and scope Locale
220+ *
221+ * @param mixed $scope Information about scope
222+ * @param string|integer|\DateTime|array|null $date date in UTC
223+ * @param boolean $includeTime flag for including time to date
224+ * @return \DateTime
195225 */
196226 public function scopeDate ($ scope = null , $ date = null , $ includeTime = false )
197227 {
@@ -204,7 +234,12 @@ public function scopeDate($scope = null, $date = null, $includeTime = false)
204234 }
205235
206236 /**
207- * {@inheritdoc}
237+ * Format date using current locale options and time zone.
238+ *
239+ * @param \DateTime|null $date
240+ * @param int $format
241+ * @param bool $showTime
242+ * @return string
208243 */
209244 public function formatDate ($ date = null , $ format = \IntlDateFormatter::SHORT , $ showTime = false )
210245 {
@@ -218,7 +253,12 @@ public function formatDate($date = null, $format = \IntlDateFormatter::SHORT, $s
218253 }
219254
220255 /**
221- * {@inheritdoc}
256+ * Get scope timestamp
257+ *
258+ * Timestamp will be built with scope timezone settings
259+ *
260+ * @param mixed $scope
261+ * @return int
222262 */
223263 public function scopeTimeStamp ($ scope = null )
224264 {
@@ -231,7 +271,12 @@ public function scopeTimeStamp($scope = null)
231271 }
232272
233273 /**
234- * {@inheritdoc}
274+ * Checks if current date of the given scope (in the scope timezone) is within the range
275+ *
276+ * @param int|string|\Magento\Framework\App\ScopeInterface $scope
277+ * @param string|null $dateFrom
278+ * @param string|null $dateTo
279+ * @return bool
235280 */
236281 public function isScopeDateInInterval ($ scope , $ dateFrom = null , $ dateTo = null )
237282 {
@@ -300,6 +345,7 @@ public function formatDateTime(
300345
301346 /**
302347 * Convert date from config timezone to Utc.
348+ *
303349 * If pass \DateTime object as argument be sure that timezone is the same with config timezone
304350 *
305351 * @param string|\DateTimeInterface $date
@@ -315,6 +361,7 @@ public function convertConfigTimeToUtc($date, $format = 'Y-m-d H:i:s')
315361
316362 /**
317363 * Convert date from config timezone to Utc.
364+ *
318365 * If pass \DateTime object as argument be sure that timezone is the same with config timezone
319366 *
320367 * @param string|\DateTimeInterface $date
0 commit comments