Skip to content

Instantly share code, notes, and snippets.

@drewlesueur
Created November 19, 2010 23:14
Show Gist options
  • Select an option

  • Save drewlesueur/707383 to your computer and use it in GitHub Desktop.

Select an option

Save drewlesueur/707383 to your computer and use it in GitHub Desktop.
hours estimator helper
a = t()
low = 0
high = 0
a.replace /^[\d]+\-[\d]+ hours/mig , (hours) ->
#console.log hours
hours = hours.split " "
hours = hours[0]
hours = hours.split "-"
low += hours[0] - 0
high += hours[1] - 0
r("""
Total: #{low}-#{high} hours
#{low/40} weeks-#{high/40} weeks
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment