Changeset 45573 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 06/28/2019 06:43:27 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/formatting.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r45569 r45573 3609 3609 * 3610 3610 * @since 1.5.0 3611 * @since 5.3.0 Added support for showing a difference in seconds. 3611 3612 * 3612 3613 * @param int $from Unix timestamp from which the difference begins. … … 3621 3622 $diff = (int) abs( $to - $from ); 3622 3623 3623 if ( $diff < HOUR_IN_SECONDS ) { 3624 if ( $diff < MINUTE_IN_SECONDS ) { 3625 $secs = $diff; 3626 if ( $secs <= 1 ) { 3627 $secs = 1; 3628 } 3629 /* translators: Time difference between two dates, in seconds. %s: Number of seconds */ 3630 $since = sprintf( _n( '%s second', '%s seconds', $secs ), $secs ); 3631 } elseif ( $diff < HOUR_IN_SECONDS && $diff >= MINUTE_IN_SECONDS ) { 3624 3632 $mins = round( $diff / MINUTE_IN_SECONDS ); 3625 3633 if ( $mins <= 1 ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)