You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have had this issue come up at my job. I wanted to use Humanizer for sending token lifespans in emails. For example, "Click the link above, etc. This link will expire in {X minutes/days/whatever}."
Our requirements/marketing people seem to prefer displaying 7 days or 30 days instead of weeks. I looked over the code and didn't see an existing way to make this happen (except for getting a formatter and duplicating some of the existing code with tweaks).
I went home, forked Humanizer, coded, and tested a solution. I was wondering if this would be considered viable or valuable?
The change involves adding a parameter to the methods, TimeUnit maxUnit, which is defaulted to Weeks. I also implemented this down to milliseconds (ie. display 1000 milliseconds instead of 1 second).
It's backward compatible.
Thoughts?
The text was updated successfully, but these errors were encountered:
I have had this issue come up at my job. I wanted to use Humanizer for sending token lifespans in emails. For example, "Click the link above, etc. This link will expire in {X minutes/days/whatever}."
Our requirements/marketing people seem to prefer displaying 7 days or 30 days instead of weeks. I looked over the code and didn't see an existing way to make this happen (except for getting a formatter and duplicating some of the existing code with tweaks).
I went home, forked Humanizer, coded, and tested a solution. I was wondering if this would be considered viable or valuable?
The change involves adding a parameter to the methods, TimeUnit maxUnit, which is defaulted to Weeks. I also implemented this down to milliseconds (ie. display 1000 milliseconds instead of 1 second).
It's backward compatible.
Thoughts?
The text was updated successfully, but these errors were encountered: