Browse Source

Date parse debugging

pull/127/head
Zach Wise 13 years ago
parent
commit
b5b721c027
  1. 21
      source/js/VMM.Timeline.js
  2. 4
      source/js/VMM.Util.js

21
source/js/VMM.Timeline.js

@ -436,14 +436,17 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
_date.enddate = _date.startdate;
}
_date.title = data.date[i].headline;
_date.headline = data.date[i].headline;
_date.type = data.date[i].type;
_date.date = VMM.Util.date.prettyDate(_date.startdate);
_date.asset = data.date[i].asset;
_date.fulldate = _date.startdate.getTime();
_date.text = data.date[i].text;
_date.content = "";
_date.title = data.date[i].headline;
_date.headline = data.date[i].headline;
_date.type = data.date[i].type;
_date.date = VMM.Util.date.prettyDate(_date.startdate);
_date.startdate_str = VMM.Util.date.prettyDate(_date.startdate);
_date.enddate_str = VMM.Util.date.prettyDate(_date.enddate);
_date.asset = data.date[i].asset;
_date.fulldate = _date.startdate.getTime();
_date.text = data.date[i].text;
_date.content = "";
_dates.push(_date);
@ -464,7 +467,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
var _date = {};
var td_num = 0;
var td = _dates[0].startdate;
_date.startdate = _dates[0].startdate;
_date.startdate = new Date(_dates[0].startdate);
trace(_dates[0].startdate);
trace(_date.startdate);

4
source/js/VMM.Util.js

@ -187,6 +187,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
var _d_array; // DATE ARRAY
var _t_array; // TIME ARRAY
if ( d.match(/,/gi) ) {
trace("DATE HAS ,");
_d_array = d.split(",");
for(var i = 0; i < _d_array.length; i++) {
_d_array[i] = parseInt(_d_array[i]);
@ -199,6 +200,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
if ( _d_array[5] > 1 ) { _date.setSeconds( _d_array[5]); }
if ( _d_array[6] > 1 ) { _date.setMilliseconds( _d_array[6]); }
} else if (d.match("/")) {
trace("DATE HAS /");
var _time_parse;
var _times;
if (d.match(" ")) {
@ -225,7 +227,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
_date.setMinutes(0);
_date.setSeconds(0);
_date.setMilliseconds(0);
}else {
} else {
_date = new Date(
parseInt(d.slice(0,4)),
parseInt(d.slice(4,6)) - 1,

Loading…
Cancel
Save