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
pretty-ms does not put a space between numbers and units unless the verbose option is enabled.
However the standard as per wikipedia:
"The International System of Units (SI) recommends inserting a space between a number and a unit of measurement units and between units in compound units, but never between a prefix and a base unit.
5.0 cm not 5.0cm or 5.0 c m
45 kg not 45kg or 45 k g...
Why does pretty-ms deviate from the standard? Or am I missing something?
I understand that it is very possible to change the result string in the code itself. I just wanted to know.
The text was updated successfully, but these errors were encountered:
You are the first to bring this up. It's mostly for stylistic and readability reasons. Also, the name of this package is pretty-ms, not si-correct-ms 😛.
5h 1m 45s
5 h 1 m 45 s
The second one is much less readable.
You could argue that it should have two spaces between components then, but that doesn't look very good either:
5 h 1 m 45 s
Apple doesn't use space between the unit either when showing abbreviated time on iOS/macOS either.
Closing this as I don't intend to change it or add an option to change it.
pretty-ms does not put a space between numbers and units unless the verbose option is enabled.
However the standard as per wikipedia:
"The International System of Units (SI) recommends inserting a space between a number and a unit of measurement units and between units in compound units, but never between a prefix and a base unit.
5.0 cm not 5.0cm or 5.0 c m
45 kg not 45kg or 45 k g...
The only exception to this rule in the SI the symbolic notation of angles: degree (e.g. 30°), minute of arc (e.g. 22′), and second of arc (e.g. 8″)."
http://en.wikipedia.org/wiki/Space_(punctuation)#Spaces_and_unit_symbols
Why does pretty-ms deviate from the standard? Or am I missing something?
I understand that it is very possible to change the result string in the code itself. I just wanted to know.
The text was updated successfully, but these errors were encountered: