Libraryless. Click here for Pure Java version (128L/1K).
1 | sS formatHours_roundUp(long ms, int decimals default 1) { |
2 | ret formatHours_roundUp(toHours(ms), decimals); |
3 | } |
4 | |
5 | sS formatHours_roundUp(double hours, int decimals default 1) { |
6 | S formatted = formatDouble_roundUp(hours, decimals); |
7 | ret eq(formatted, "1") ? "1 hour" : formatted + " hours"; |
8 | } |
Began life as a copy of #1036176
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1036395 |
Snippet name: | formatHours_roundUp |
Eternal ID of this version: | #1036395/1 |
Text MD5: | 0fa202498422de44afdfd1a4ed141e6c |
Transpilation MD5: | f0ef3061020d0690785c50d302b04e21 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-12-06 15:42:08 |
Source code size: | 297 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 117 / 175 |
Referenced in: | [show references] |