Permalink
Browse files

修改异动时间格式

  • Loading branch information...
1 parent a4e3729 commit 08f66634f1e07b371297127239512f175d98884e @qiguyu qiguyu committed Feb 27, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/ydtx.js
View
@@ -28,8 +28,10 @@ exports.addYdtx = function(stockcode, content) {
var addYdtxWeibo = function(data) {
var ydData = formatYdNumbers(data);
var ydDate = new Date(ydData.date);
- ydData.ydHour = ydDate.getHours();
- ydData.ydMin = ydDate.getMinutes();
+ var ydHH = ydDate.getHours().toString();
+ var ydii = ydDate.getMinutes().toString();
+ ydData.ydHour = (ydHH[1]?ydHH:"0"+ydHH[0]);
+ ydData.ydMin = (ydii[1]?ydii:"0"+ydii[0]);
var content_type = 'yd_zhangdie';
switch(ydData.datatype) {
case 1:

0 comments on commit 08f6663

Please sign in to comment.