Adding a "Days Ago" Indicator to the Post Curation Tool
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
Leave Adding a "Days Ago" Indicator to the Post Curation Tool to:
Read more #dev posts
Best Posts From Michael Garcia
We have not curated any of thecrazygm's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Michael Garcia
- Playing Traffic Cop, Part Two: When the Cop Pulls Over Everybody
- Moon Has Moved to Finland
- A Good Week for Small Hive-Engine Fixes
- An Accidental Stress Test for Hive-Engine Data Integrity
- Fixing Data Integrity Issues in Hive-Engine Nodes
- The Final Chapter: dCity's 70,000 HIVE Claimdrop Has Been Distributed!
- Anther v0.1.0: A Modern Go SDK for Building on Hive
- Redesigning the Project Builder (GET FEATURED!)
- HiveTools Workbench: A Week of Polish, Pollen, and Splinterlands Wallets
- Pollen: A Safer, Cleaner Path Forward for Hive JavaScript Developers