• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

electron based twitter client


Commit MetaInfo

Revisión6378647b1447c7ee7c0d578c1326fc4e40c507d4 (tree)
Tiempo2016-02-08 19:06:03
Autorhylom <hylom@user...>
Commiterhylom

Log Message

format timestamp with moment.js

Cambiar Resumen

Diferencia incremental

--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
2323 "electron-prebuilt": "^0.36.0",
2424 "jquery": "2.2.0",
2525 "twitter": "1.2.5",
26- "ejs": "2.4.1"
26+ "ejs": "2.4.1",
27+ "moment": "2.11.2"
2728 }
2829 }
--- a/view.js
+++ b/view.js
@@ -1,6 +1,7 @@
11 var util = require('util');
22 var $ = require('jquery');
33 var ejs = require('ejs');
4+var moment = require('moment');
45
56 function sprnkrViewMain () {
67 var tweetWriter = {};
@@ -10,7 +11,7 @@ function sprnkrViewMain () {
1011 }
1112 var tweetData = {
1213 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'),
1415 text: tweet.text,
1516 iconUrl: tweet.user.profile_image_url
1617 }