author | Michael Krelin <hacker@klever.net> | 2006-11-12 22:09:39 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2006-11-12 22:09:39 (UTC) |
commit | afcae0d9514f35c96484e6db1eb21e76821b5654 (patch) (unidiff) | |
tree | 09f24641d6d156e4592778813cbeda62ce03eded /content | |
parent | 41d39823cf8a9e08ad17b9863e5e3ed88df0ac4e (diff) | |
download | fireflix-afcae0d9514f35c96484e6db1eb21e76821b5654.zip fireflix-afcae0d9514f35c96484e6db1eb21e76821b5654.tar.gz fireflix-afcae0d9514f35c96484e6db1eb21e76821b5654.tar.bz2 |
display human readable picture upload time
git-svn-id: http://svn.klever.net/kin/fireflix/trunk@215 fe716a7a-6dde-0310-88d9-d003556173a8
-rw-r--r-- | content/fireflix.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/content/fireflix.js b/content/fireflix.js index 85b4d39..a4f13b6 100644 --- a/content/fireflix.js +++ b/content/fireflix.js | |||
@@ -103,3 +103,9 @@ var fireflix = { | |||
103 | if(c.id=='sp_taken') return p.datetaken; | 103 | if(c.id=='sp_taken') return p.datetaken; |
104 | if(c.id=='sp_upload') return p.dateupload; /* TODO: unixtime conversion */ | 104 | if(c.id=='sp_upload') { |
105 | var du = new Date(p.dateupload*1000); | ||
106 | var rv = du.getFullYear()+'-'+(du.getMonth()+1)+'-'+du.getDate() | ||
107 | +' '+ | ||
108 | du.getHours()+':'+du.getMinutes()+':'+du.getSeconds(); | ||
109 | return rv.replace(/(\D)(\d)(\D)/,'$10$2$3'); | ||
110 | } | ||
105 | return c.id; | 111 | return c.id; |