Skip to content

Commit

Permalink
modification time
Browse files Browse the repository at this point in the history
  • Loading branch information
darvin committed Jan 13, 2013
1 parent 2fd420b commit e0aee75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -8,7 +8,8 @@
"coffee-script": ">= 1.4.x",
"jade": "*",
"knox": "*",
"filesize":"*"
"filesize":"*",
"moment":"*"
},
"devDependencies": {},
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion routes.coffee
@@ -1,5 +1,7 @@
knox = require 'knox'
filesize = require 'filesize'
moment = require 'moment'

module.exports =
home: (req, res, next)->
res.render "home"
Expand Down Expand Up @@ -48,7 +50,7 @@ module.exports =
name:item.Key
path:item.Key
size:filesize(item.Size)
modified:item.LastModified
modified:moment(item.LastModified).calendar()
isFolder: false
}

Expand Down
2 changes: 1 addition & 1 deletion views/list.jade
Expand Up @@ -17,4 +17,4 @@ block content
td(style="width: 10%")
if !file.isFolder
div #{file.size}
td(style="width: 10%") #{file.modified}
td(style="width: 20%") #{file.modified}

0 comments on commit e0aee75

Please sign in to comment.