Skip to content

Fixed Single-second edge case. #871

merged 6 commits into from Dec 10, 2012

2 participants


As promised, this fixes the edge case identified in the post-close comments on Pull Request #867 - to reiterate:

"Ok, so we (internally) identified a minor issue with this pull request, and that is in the edge case where the elapsed duration is exactly one second. The way the translation string is evaluated, it will try to find a string that terminates with "secondAgo" and or "secondIn", neither of which currently exists in the strings file or the unit tests. I'll fix it as soon as I'm back from vacation (sunday)."

Fix was to add the secondIn and secondAgo translation strings, and to adjust the unit tests to also test that particular edge case.

krotscheck added some commits Nov 13, 2012
@krotscheck krotscheck Added special getter for "elapsed" time. 05a59b2
@krotscheck krotscheck Created "%E" and "%e" time formatters, for elapsed time measurments. 6838cc8
@krotscheck krotscheck Added datetime/core dependency to datetime/localized. f3d6b47
@krotscheck krotscheck Fixed source formatting.
Moved string formatting logic into datetime/localized as it depends on
Created stub method in datetime/core
Added %E and %e to unit tests in datetime/core
@krotscheck krotscheck Bugfix: Added an additional translation string (and appropriate unit
tests) for the one-second case that translates to _SC.DateTime.secondAgo
(previously unhandled)
@krotscheck krotscheck Merging upstream/master 032800b
@publickeating publickeating merged commit 5edc1cb into sproutcore:master Dec 10, 2012
SproutCore member

Thanks for staying on top of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.