electron based twitter client
Revisión | 6378647b1447c7ee7c0d578c1326fc4e40c507d4 (tree) |
---|---|
Tiempo | 2016-02-08 19:06:03 |
Autor | hylom <hylom@user...> |
Commiter | hylom |
format timestamp with moment.js
@@ -23,6 +23,7 @@ | ||
23 | 23 | "electron-prebuilt": "^0.36.0", |
24 | 24 | "jquery": "2.2.0", |
25 | 25 | "twitter": "1.2.5", |
26 | - "ejs": "2.4.1" | |
26 | + "ejs": "2.4.1", | |
27 | + "moment": "2.11.2" | |
27 | 28 | } |
28 | 29 | } |
@@ -1,6 +1,7 @@ | ||
1 | 1 | var util = require('util'); |
2 | 2 | var $ = require('jquery'); |
3 | 3 | var ejs = require('ejs'); |
4 | +var moment = require('moment'); | |
4 | 5 | |
5 | 6 | function sprnkrViewMain () { |
6 | 7 | var tweetWriter = {}; |
@@ -10,7 +11,7 @@ function sprnkrViewMain () { | ||
10 | 11 | } |
11 | 12 | var tweetData = { |
12 | 13 | name: tweet.user.name + ' (@' + tweet.user.screen_name + ')', |
13 | - timestamp: tweet.created_at, | |
14 | + timestamp: moment(tweet.created_at).format('YYYY-MM-DD hh:mm:ss'), | |
14 | 15 | text: tweet.text, |
15 | 16 | iconUrl: tweet.user.profile_image_url |
16 | 17 | } |