File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/Eav/Model/Entity/Attribute/Backend Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ public function beforeSave($object)
61
61
/**
62
62
* Prepare date for save in DB
63
63
*
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)
64
+ * string format is used in input fields (all date input fields need apply locale settings)
65
+ * int (Unix) format can be used in other parts of the code
66
66
*
67
67
* @param string|int|\DateTimeInterface $date
68
68
* @return string
@@ -72,7 +72,7 @@ public function formatDate($date)
72
72
if (empty ($ date )) {
73
73
return null ;
74
74
}
75
- // unix timestamp given - simply instantiate date object
75
+ // Unix timestamp given - simply instantiate date object
76
76
if (is_scalar ($ date ) && preg_match ('/^[0-9]+$/ ' , $ date )) {
77
77
$ date = (new \DateTime ())->setTimestamp ($ date );
78
78
} elseif (!($ date instanceof \DateTimeInterface)) {
You can’t perform that action at this time.
0 commit comments