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

Nicetime fix: 0 seconds from now -> just now #1509

Merged
merged 4 commits into from
Jun 2, 2017
Merged

Nicetime fix: 0 seconds from now -> just now #1509

merged 4 commits into from
Jun 2, 2017

Conversation

rdnt
Copy link
Contributor

@rdnt rdnt commented Jun 2, 2017

This fixes the weird message that appears when the posting time equals the current date, for example if a user submits a comment and checks the time their comment was posted right away.

Will probably require the JUST_NOW variable to be added to all translations.

rdnt added 4 commits June 2, 2017 06:54
Check if date matches, which means the post / comment was posted just now. 

Will return proper value to whatever function uses it.
The file /system/languages/en.yaml and basically all language files need to include the JUST_NOW text value which should be "just now", of course correctly translated in each language.

This fix has been created in order to fix the "0 seconds from now" message as it sounds weird.
Should be translated to other languages and included in all translation files.
Update TwigExtension.php - Fixing nicetime when post time equals current date
@rhukster rhukster merged commit 634f2bd into getgrav:develop Jun 2, 2017
@rhukster
Copy link
Member

rhukster commented Jun 2, 2017

Thanks.

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