Giter VIP home page Giter VIP logo

Comments (13)

ktiy avatar ktiy commented on May 18, 2024 6

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.

illuminist avatar illuminist commented on May 18, 2024 5

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.

getsnoopy avatar getsnoopy commented on May 18, 2024 5

@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.

getsnoopy avatar getsnoopy commented on May 18, 2024 4

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.

getsnoopy avatar getsnoopy commented on May 18, 2024 3

@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.

PhiLhoSoft avatar PhiLhoSoft commented on May 18, 2024 3

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.

leerob avatar leerob commented on May 18, 2024 1

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.

leerob avatar leerob commented on May 18, 2024

Closing per #136.

Edit: See discussion on that PR!

from ms.

leerob avatar leerob commented on May 18, 2024

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.

getsnoopy avatar getsnoopy commented on May 18, 2024

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.

ljharb avatar ljharb commented on May 18, 2024

@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.

leerob avatar leerob commented on May 18, 2024

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.

leerob avatar leerob commented on May 18, 2024

TIL you can't upvote locked issues - my bad!

from ms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.