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

lightbox: Use a friendlier format for the date #1197

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lakshya1goel
Copy link

Key Changes

Changed the timestamp format from Mar 31, 2023 15:09:51 to a more readable Mar 31, 2023 at 3:09 PM.
Added proper localization support to adapt timestamps to the user's language and region preferences.
Optimized the timestamp logic to ensure accurate categorization into Today, Yesterday, or specific dates.
Modified test also to ensure the correct format of date.

Issue: #45

Screenshots:

WhatsApp Image 2024-12-22 at 7 43 22 AM WhatsApp Image 2024-12-22 at 7 43 22 AM(1)
WhatsApp Image 2024-12-22 at 7 43 23 AM WhatsApp Image 2024-12-22 at 7 43 23 AM(1)

Changed the timestamp format from Mar 31, 2023 15:09:51 to a more
readable Mar 31, 2023 at 3:09 PM.
Added proper localization support to adapt timestamps to the user's
language and region preferences.
Optimized the timestamp logic to ensure accurate categorization into
Today, Yesterday, or specific dates.

Fixes: zulip#45
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.

1 participant