       allSteps.length
 
     isTaskPastDue: (taskId) ->
-      task = @_get(taskId)
-      moment(TimeStore.getNow()).isAfter(task.due_at)
+      Durations.isPastDue( @_get(taskId) )
 
     isPractice: (taskId) ->
       practices = [

moment = require 'moment'
flux = require 'flux-react'

{TimeStore} = require './time'
{CrudConfig, makeSimpleStore, extendConfig} = require './helpers'
# export the module immediatly before requiring task-step
# Unfortunantly task-step also needs access to the TaskStore so we export the definition before we require it.
# The exported object is extended below after the definition
module.exports = {}
{TaskStepStore} = require './task-step'

getSteps = (steps) ->


extendConfig(TaskConfig, new CrudConfig())
{actions, store} = makeSimpleStore(TaskConfig)
module.exports = {TaskActions:actions, TaskStore:store}
