Add option for relative in-message timestamp to be unrounded and/or floored
Currently when using an in-message timestamp set to Relative time, the value is rounded and thus may ceiling. For instance, if the specified time is 2 hours and 50 minutes in the future, the text displayed will be "in 3 hours," which is incorrect. The margin of error increases relative to the units used since it will round to the nearest whole full number in that unit.
Due to the above, this feature is less useful; I wanted to have bots specifying how long until upcoming events, but the rounded up/ceiling times are misleading and can cause users to miss those events.
The implementation of in-message timestamps uses the moment.js library, which already has a solution for this issue: relativeTimeRounding and relativeTimeThreshold. Modifying these properly can make the output more precise and thus more useful. Ideally it would be better to specify a lesser value than a higher one.
-
Yeah this is definitely needed.
0 -
I agree. Exactly right now I'm facing that issue, it says 2 hours (or 3 hours) when in fact is 2h 30m
0
Accedi per aggiungere un commento.
Commenti
2 commenti