-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
44 to 44 seconds #4086
Comments
Yeah, I think that is what it's suppose to be saying. That's a) a little weird, and b) doesn't actually work. This code seems a little buggy: var thresholds = {
ss: 44, // a few seconds to seconds
s : 45, // seconds to minute
m : 45, // minutes to hour
h : 22, // hours to day
d : 26, // days to month
M : 11 // months to year
};
function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
//snip
var a = seconds <= thresholds.ss && ['s', seconds] ||
seconds < thresholds.s && ['ss', seconds] ||
minutes <= 1 && ['m'] ||
minutes < thresholds.m && ['mm', minutes] ||
hours <= 1 && ['h'] ||
hours < thresholds.h && ['hh', hours] ||
days <= 1 && ['d'] ||
days < thresholds.d && ['dd', days] ||
months <= 1 && ['M'] ||
months < thresholds.M && ['MM', months] ||
years <= 1 && ['y'] || ['yy', years];
//snip
} It checks See #3738 |
IMO, the fix could be
|
Copied from the PR @icambron linked:
Does this make sense? @Falci - Would love a contribution to our docs at https://github.com/moment/momentjs.com/ |
Description of the Issue and Steps to Reproduce:
This documentation is not clear about the
ss
key: 44 to 44 seconds.What does it mean? Is it a special case that affects only exactly 44 seconds? Won't 44 seconds be covered by the
s
section? (0 to 44 seconds).Environment:
Documentation section from momentjs.com
The text was updated successfully, but these errors were encountered: