     A highly extensible date time picker directive.
 ###
 module = angular.module 'ui.bootstrap.moment.datetimepicker', []
-
 #
 # Contain default parameters for the directive
 #
-module.constant('dateTimePickerConfig', {
+module.constant 'dateTimePickerConfig', {
   year:
     format: 'YYYY'
     first: (date) ->

    step: moment.duration(5, 'second')
    previous: moment.duration(-1, 'hour')
    next: moment.duration(1, 'hour')
})

#
# moment datetimepicker directive.
#
module.directive 'momentDatetimepicker', ->
  return {
  scope: {
    mdFormat: '&'     # moment format string use to format the current date.
    minDate: '=?'     # minimum selectionable date.
    maxDate: '=?'     # maximum selectionable date.
    currentView: '=?' #
    commitView: '&'   #
    afterSelect: '&'
  }
  require: 'ngModel'
  replace: true
  link: (scope, elm, attr, ngModel)->
    scope.currentView = if scope.currentView? then 'year'
    console.log scope


    #
    # Helper functions returning the durations


      scope.steps = for i in [1..amount]

        # TODO: Use the step to make the comparison!
        before = if scope.minDate? then stepDate.isBefore(scope.minDate, scope.currentView) else true
        after = if scope.maxDate? then stepDate.isAfter(scope.maxDate, scope.currentView) else true
        same = stepDate.isSame(scope.date, scope.currentView)
