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

[WIP] Add relative date formatting for date/datetime columns #578

Conversation

sfnelson
Copy link
Contributor

@hasarindaKI I've pulled this out as I don't think it's close enough to ready to continue with.

The goal I had in mind was that dates and times would be relative when it's helpful, and absolute when it's not.

2 days ago is helpful, 260 days ago is not helpful.

A lot of what you've done here is already available in Rails: ActionView::Helpers::DateHelper#distance_of_time_in_words

I think the hard part is working out when to use that helper vs when to use absolute dates.

I've pushed a WIP commit that I hope shows my thinking about how this could work.

I think the date maths stuff should be in Koi::DateHelper – you can delete everything else there.

@sfnelson sfnelson requested a review from hasarindaKI February 28, 2024 12:23
@sfnelson sfnelson changed the title Add relative date formatting for date/datetime columns [WIP] Add relative date formatting for date/datetime columns Feb 28, 2024
@hasarindaKI hasarindaKI force-pushed the investment/type-based-index-table branch 3 times, most recently from 3f51e41 to f2859e1 Compare February 29, 2024 03:07
@hasarindaKI hasarindaKI force-pushed the feature/relative-date-columns branch from 143803e to c35da02 Compare February 29, 2024 04:20
@hasarindaKI hasarindaKI force-pushed the investment/type-based-index-table branch from f2859e1 to 9431fad Compare February 29, 2024 04:21
@hasarindaKI hasarindaKI force-pushed the feature/relative-date-columns branch 2 times, most recently from da79b3d to e1fe792 Compare February 29, 2024 04:27
@hasarindaKI hasarindaKI force-pushed the investment/type-based-index-table branch from 9431fad to a82713a Compare February 29, 2024 04:34
@hasarindaKI hasarindaKI force-pushed the feature/relative-date-columns branch 2 times, most recently from 0dbd3c8 to a49ff73 Compare February 29, 2024 05:03
@hasarindaKI hasarindaKI force-pushed the investment/type-based-index-table branch from a82713a to 040d7de Compare February 29, 2024 23:26
@hasarindaKI hasarindaKI force-pushed the feature/relative-date-columns branch from a49ff73 to b1e8517 Compare February 29, 2024 23:26
@sfnelson sfnelson deleted the branch investment/type-based-index-table March 1, 2024 03:13
@sfnelson sfnelson closed this Mar 1, 2024
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