Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

29849 better human time diff core changes #7767

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

pbearne
Copy link

@pbearne pbearne commented Nov 11, 2024

follow up patch with core changes

Trac ticket: https://core.trac.wordpress.org/ticket/29849

Paul Bearne added 3 commits November 11, 2024 15:56
Introduce wp_natural_time function to format time differences in a human-readable manner. Add extensive PHPUnit tests to cover various time intervals and edge cases for robust validation.
Updated various instances where human_time_diff was used to calculate human-readable time differences to use the more flexible wp_natural_time function instead. This change simplifies the code and leverages the improved functionality of wp_natural_time for a more natural language output.
Removed an unnecessary space in the setUp method declaration within the PHPUnit test for WpNaturalTime. This ensures consistency in code formatting and adheres to PSR-12 coding standards.
Copy link

github-actions bot commented Nov 11, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @[email protected].

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props pbearne, audrasjb.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants