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

Update date formatting to display minutes, hours, days, and months #147

Conversation

HemalDesai
Copy link
Contributor

@HemalDesai HemalDesai commented Sep 11, 2024

feat: Update date format to display minutes, hours, days, and months

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (fixes an existing functionality which was not working as expected)
  • Documentation change (changes to Readme.md or other docs)

Description of Changes

This feature updates the date formatting logic to provide more granular time intervals:

  • For events within the first 60 minutes: display time in minutes.
  • For events between 1 and 24 hours: display time in hours.
  • After 24 hours: display time in days.
  • After 30 days: display time in months.

The new format ensures a more intuitive display of elapsed time for the users.

Screenshots/Videos (if applicable)

image

Checklist

  • I have rebased the branch using git pull origin main --rebase and tested the feature.
  • I have conducted a self-review of my code to ensure it contains only the changes related to this feature.
  • I have commented my code in areas that are complex or require clarification.
  • I have tested compatibility with other parts of the codebase by running the site and performing actions unrelated to my changes.

Resolves #146

Copy link
Member

@amandesai01 amandesai01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe code works as expected. I just created a posting (~2min) and after your changes, it shows 5h ago.

Before
Screenshot 2024-09-12 at 8 43 35 PM

After
Screenshot 2024-09-12 at 8 42 51 PM

@HemalDesai
Copy link
Contributor Author

@amandesai01 Can you please let me know the OS and browser you used ?

@amandesai01
Copy link
Member

Macos and chrome (should not matter since this works on standard js spec thus browser/platform agnostic)

@HemalDesai
Copy link
Contributor Author

@amandesai01 check now i guess it should work now.

@HemalDesai HemalDesai closed this Sep 13, 2024
@HemalDesai HemalDesai deleted the fix/update-date-format-to-minutes-hours-days-months branch September 13, 2024 06:20
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.

Change Date format for Jobs posted
3 participants