Skip to content

Commit 78c235b

Browse files
authored
ENGCOM-6963: fixed confusing grammar in the backend formatDate() function #25161
2 parents 0029cdc + fd65a0b commit 78c235b

File tree

1 file changed

+5
-3
lines changed
  • app/code/Magento/Eav/Model/Entity/Attribute/Backend

1 file changed

+5
-3
lines changed

app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
namespace Magento\Eav\Model\Entity\Attribute\Backend;
88

99
/**
10+
* Prepare date for save in DB
11+
*
1012
* @api
1113
* @since 100.0.2
1214
*/
@@ -61,8 +63,8 @@ public function beforeSave($object)
6163
/**
6264
* Prepare date for save in DB
6365
*
64-
* string format used from input fields (all date input fields need apply locale settings)
65-
* int value can be declared in code (this meen whot we use valid date)
66+
* String format is used in input fields (all date input fields need apply locale settings)
67+
* int (Unix) format can be used in other parts of the code
6668
*
6769
* @param string|int|\DateTimeInterface $date
6870
* @return string
@@ -72,7 +74,7 @@ public function formatDate($date)
7274
if (empty($date)) {
7375
return null;
7476
}
75-
// unix timestamp given - simply instantiate date object
77+
// Unix timestamp given - simply instantiate date object
7678
if (is_scalar($date) && preg_match('/^[0-9]+$/', $date)) {
7779
$date = (new \DateTime())->setTimestamp($date);
7880
} elseif (!($date instanceof \DateTimeInterface)) {

0 commit comments

Comments
 (0)