Make WordPress Core


Ignore:
Timestamp:
06/28/2019 06:43:27 AM (5 years ago)
Author:
pento
Message:

Formatting: Add support for seconds to human_time_diff().

The web has gotten so much faster since human_time_diff() was created, we need to be able to measure time differences with much finer granularity. Now, we can.

Props johnjamesjacoby, pento.
Fixes #35655.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/HumanTimeDiff.php

    r41018 r45573  
    2020    function data_test_human_time_diff() {
    2121        return array(
     22            array(
     23                '37 seconds',
     24                new DateTime( '2016-01-01 12:00:37' ),
     25                'Test a difference of 37 seconds.',
     26            ),
    2227            array(
    2328                '5 mins',
Note: See TracChangeset for help on using the changeset viewer.