[wp-trac] [WordPress Trac] #56293: Use 'MINUTE_IN_SECONDS' for consistency in 'update.php' file

WordPress Trac noreply at wordpress.org
Mon Aug 1 04:02:02 UTC 2022


#56293: Use 'MINUTE_IN_SECONDS' for consistency in 'update.php' file
------------------------------------+-------------------------------
 Reporter:  hztyfoon                |       Owner:  audrasjb
     Type:  defect (bug)            |      Status:  reviewing
 Priority:  low                     |   Milestone:  6.1
Component:  Administration          |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  coding-standards
------------------------------------+-------------------------------

Comment (by krupalpanchal):

 Replying to [comment:27 SergeyBiryukov]:
 > Replying to [comment:26 costdev]:
 > > What does everyone think of that format?
 >
 > Sounds good. I guess the rule of thumb would be:
 > * If the value can be represented as an integer (not a fractional)
 number of minutes (hours, etc.), use the appropriate constant multiplied
 by that number.
 > * Otherwise, keep the value as is and add a comment with the units for
 clarity.

 That sounds clear 👍. Using a constant is more clear than making an
 arithmetic formula.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56293#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list