Replies: 1 comment
-
|
Aren't hour and minutes scaled units instead of prefixes? For example, "kilo" is a prefix because with "k" for kilo and "m" for metre, we form "km" for kilometre. But "min" is not a prefix: we do not combine "min" with "s" for forming "mins". Instead, the following should work for producing minutes and hours from seconds. For example with the Seshat implementation (I did not verified with Indriya), Unit<Time> MINUTE = SECOND.multiply(60);
Unit<Time> HOUR = MINUTE.multiply(60); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem: Current prefix systems (MetricPrefix with base-10, BinaryPrefix with base-1024) don't cover time units which use base-60 (sexagesimal) for minutes and hours.
Proposal: Add
SexagesimalPrefixenum withMINUTE(60¹) andHOUR(60²) constants, following the same pattern as existing prefix implementations.Benefits:
MetricPrefixandBinaryPrefixdesignAn implementation might look like this
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions