Hey everyone,
I was catching up on the requests for the Post Curation Tool (PCT) in the recent post by @friendlymoose. I decided to tackle one of them this morning to help move the project forward.
The Feature Request
For context, here is the current list of requested features for the PCT:
- Filtering on post rewards
- Filtering on age of the account
Indicators for the age of the post<-- This is the one I worked on.- Filtering on language
And/Or filtering of variables- Minimal number of words
The request, originally from @ladyaryastark, was to add a clearer indicator of how old a post is. When you're curating, knowing if a post is a current or a few days old is critical information and not obvious by the timestamp and not everyone is logged in to see the red/purple heart visual.
The Implementation
To address this, I wrote a simple helper function that calculates the time difference between now and when the post was created, and then formats it into a human-readable "X days ago" string. This small addition makes the age of each post immediately obvious at a glance.
Here is the result in action:
It's a small change, but it's a quality-of-life improvement that should make the curation process a little bit smoother. It's always fun to jump in and contribute to a community project, and I'm happy to help bring one of the requested features to life.
As always,
Michael Garcia a.k.a. TheCrazyGM