소스 검색

Move to native Javascript dates

Adel Qalieh 12 년 전
부모
커밋
e3b457c70a
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      astroid-web.coffee

+ 2 - 3
astroid-web.coffee

@@ -8,7 +8,7 @@ if Meteor.isClient
 
   Template.todos.events
     'click a.completeBox': (e) ->
-      now = moment()
+      now = new Date()
       Tasks.update this._id,
         $set:
           completed: not @completed
@@ -20,12 +20,11 @@ if Meteor.isClient
       e.preventDefault()
       body = $('#new-task-text').val()
       $('#new-task-text').val("")
-      now = moment()
+      now = new Date()
       priority = 'low'
       list = 'Home'
       Tasks.insert
         body: body
-        date: now.format('D MMM YYYY')
         dateDue: now
         dateCreated: now
         dateCompleted: false