fix for ago / before functions of datejs #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Eric,
First of all, I'm sorry I can't provide a regression test for the bug this patch is supposed to fix. Neither have I built the script and updated the build/ directory - I have looked and I can't find any instructions on which minifier / macros were used and I don't want to bork things up. If you can help with this then I can give you a much better patch with all the builds fixed as well.
This is a one-line fix (despite appearances in the diff) that fixes the
(6).months().ago()set of expressions. The reason the fix works is that theadd()method incore.jsline 308 expects the plural lowercase form of the duration unit to be set, but without the+"s"that I added, sugarpak adds the property as the singular lowercase.I've made a check of the code and I can't find any other location where the singular is specifically used except in
set, so I don't believe that this patch should have any side-effects, for example if the inconsistency between singular and plural is a wider problem in the codebase.Best regards,