• Gergely Ujvari's avatar
    Break timeHelpers into smaller functions · 5b4b844c
    Gergely Ujvari authored
    Code from @nickstenning, introduce the breakpoints array and search
    in it for the needed fuzzystring and when to update next instead of
    a complex else-if tree.
    
    timeHelpers service has two functions:
    - toFuzzyString: returns the fuzzy time string
    - nextFuzzyUpdate: returns the next time to update (in sec)
    5b4b844c
time-helpers-test.coffee 1.83 KB