Replies: 4 comments
-
Thanks for your suggestion Will, makes sense to see if we can output time in better human readable format 😄 Ideally, the output would be also valid input to pass to the expression parser, this is so far the case with all formatted outputs which is very powerful I think. Your example A simple solution would be to automatically select a better prefix, so the output would be Or maybe we could introduce a special |
Beta Was this translation helpful? Give feedback.
-
Perhaps printing it as 3.9351851851852 days is decent too, and is honestly what I expected to see when I first used it. The full breakdown of times would be better for my use case (since I'm lazy), but I wouldn't want it to break anything else in the process. Perhaps you could add a new unit called "duration" that's represented as seconds internally, but expands into the human readable format when toString() is called on it. I dunno if that would work, but it's an idea. |
Beta Was this translation helpful? Give feedback.
-
wow that's so simple and obvious, good idea 👍 . It may be best to create a separate function like
Hm, interesting idea. I'm not sure whether it would work out nicely, maybe it will only get more confusing. I have the feeling this is only about the formatting at the end of the calculations, and not at calculation level itself, so I would say we should find a solution at formatting level. |
Beta Was this translation helpful? Give feedback.
-
What the original question asks for can (at least at this point) be easily accomplished by using
produces on the console
Given this, I will rephrase this as a question and move it to Discussions Q&A. |
Beta Was this translation helpful? Give feedback.
-
If I evaluate an expression like
"17 seconds * 20000"
, then print it withtoString()
, ideally it would return"3 days 22 hours 26 minutes 40 seconds"
or something to that effect. Instead, it returns"340 kiloseconds"
, which isn't the most useful time format.If an output unit is specified then obviously it shouldn't print the time string. The exact format could optionally be configurable, but anything human-readable would be fine.
Beta Was this translation helpful? Give feedback.
All reactions