Comments (13)
commonly used abbreviations for minutes include, 'm', 'min', and 'mins'
metres has no use in time, and shouldn't cause confusion
there's no standard 'shorthand', only a standard symbol (you're right, 'min'),
but i feel like 'm' might be most common, if not, really common
from ms.
Context matters. Even it outputs a full unit, like 1 minute
, but 1 minute of what?
Consider these 2 tables
------------------------
| 1 metre | 5 minutes |
| 4 metres | 8 minutes |
| 2 metres | 6 minutes |
------------------------
--Distance Traveled---Time Taken--
| 1 m | 5 m |
| 4 m | 8 m |
| 2 m | 6 m |
----------------------------------
You can see the unit abbreviation can derive the meaning nicely from its context.
from ms.
@leerob I'm not sure what you're looking for in terms of "traction". There's at least 5 people (including me) who want this to be changed at the moment, not to mention that it is the standards-compliant thing to do.
from ms.
min is the most common because it's the SI standard. m might be used somewhat commonly, but it's incorrect because the SI doesn't allow abbreviations and it's ambiguous as I pointed out.
But my main point is that the context of time is only available to the developer using this library, not necessarily to the end user seeing its output. So if the output is 1m
for example, the user has no way of knowing what that actually means. Actually, they do; it means "1 metre" as per the standard, but if it's being used incorrectly, then a user would have to reinterpret what it means in that context. 1 min
, on the other hand, is unambiguous regardless of where it's displayed (mainly because it's a symbol and not an ad-hoc abbreviation).
from ms.
@illuminist That assumes that every place that this module is used is attached to a label or the like, which isn't true. And again, the whole point of the SI is that context shouldn't determine the meaning of unit shorthand because it uses universal symbols.
In your example, if the table has 1000 rows instead of 3, and the headers are therefore off-screen, you have to try and remember, "Wait...is this 4 m in the actual sense of metres, or is this 4 m in the non-standard sense that this app is using where it can also mean minutes (or even months)? Let me scroll all the way up and find out." This situation is entirely avoided when standards are followed.
from ms.
I agree with getsnoopy, as I was surprised by this abbreviation in Node output…
SI units, names and symbols, are strictly defined and typography codes follow them.
It would be unfortunate to stick to bad output because of a small mistake made at the start of the library… 😅
from ms.
It's been over a year now, we can safely close this based on the lack of traction (x-ref #136).
Thank you regardless 🙏
from ms.
Closing per #136.
Edit: See discussion on that PR!
from ms.
It would probably need to be >100, given this package is installed 152 million times per week and is one of the most used packages on npm. Feature additions should benefit the majority of the consumers of the package, and right now, ms
is lean and serving it's purpose well – so just want to be extra cautious with adding new features that would increase the package size.
https://www.npmjs.com/package/ms
from ms.
Well that's the thing—it's not a new feature; it's a bug fix. And the fix would increase the package size by 8 bytes, a trivial sum.
from ms.
@leerob it's a pretty shocking position to take that incorrectness and confusion are less damaging than adding a highly compressible two code units ("in") to bundle sizes.
from ms.
There's not clear conviction this is a bug based on the conversation above and the lack of engagement from the community.
If that does end up changing and more folks find this behavior to be unintended we can revisit, but currently 6 upvotes on the original issue isn't enough to justify changing. The reason I mentioned package size is bceause 8 bytes is 1.2 GB @ 152 million downloads per week. Even small changes matter and should be driven by community feedback.
Thank you for your feedback and we can revisit this issue if it receives more traction. Specifically, please leave an upvote on the original issue.
from ms.
TIL you can't upvote locked issues - my bad!
from ms.
Related Issues (20)
- Question HOT 2
- hi i have issue with ms. HOT 2
- The max timeout is 24days why? HOT 1
- Timestamp Format HOT 1
- regular expression feature HOT 2
- ESM version HOT 1
- ms.validate() to validate time formats HOT 1
- Useless non capturing group in regex HOT 2
- Cannot find module 'ms' or its corresponding type declarations. (3.0.0-canary.0) HOT 4
- My code will not run after importing ms HOT 15
- Change the language HOT 2
- Release of v3.0.0 HOT 21
- TypeError: (0 , ms_1.default) is not a function HOT 4
- 'esModuleInterop' flag and referencing its default export.ts HOT 3
- fix(typing): Could not find a declaration file for module 'ms'. HOT 2
- No type definitions HOT 1
- The package is just showing the time in days
- Hello
- Defective outputs HOT 1
- Typing: ms with `StringValue` should not accept options HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ms.