Seperated date and time for the start- and enddates.
Also added the some variables for current dates.
This commit is contained in:
parent
fb7143abce
commit
4141bdb8ea
1 changed files with 8 additions and 2 deletions
10
event.js
10
event.js
|
@ -48,13 +48,19 @@ EventTool.prototype.events = [];
|
||||||
EventTool.prototype.processEventData = function() {
|
EventTool.prototype.processEventData = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var view = {
|
var view = {
|
||||||
events: []
|
events: [],
|
||||||
|
day: strftime('%d',new Date()),
|
||||||
|
month: strftime('%m',new Date()),
|
||||||
|
year: strftime('%Y',new Date()),
|
||||||
|
week: strftime('%U',new Date())
|
||||||
};
|
};
|
||||||
// prepare the data
|
// prepare the data
|
||||||
self.events.forEach(function(el) {
|
self.events.forEach(function(el) {
|
||||||
var item = {};
|
var item = {};
|
||||||
item['startdate'] = strftime('%Y-%m-%d %H:%M',el.startdate);
|
item['startdate'] = strftime('%Y-%m-%d',el.startdate);
|
||||||
|
item['starttime'] = strftime('%H:%M',el.startdate);
|
||||||
item['enddate'] = strftime('%Y-%m-%d %H:%M',el.enddate);
|
item['enddate'] = strftime('%Y-%m-%d %H:%M',el.enddate);
|
||||||
|
item['endtime'] = strftime('%H:%M',el.enddate);
|
||||||
item['heading'] = el.heading;
|
item['heading'] = el.heading;
|
||||||
item['text'] = el.text;
|
item['text'] = el.text;
|
||||||
view.events.push(item);
|
view.events.push(item);
|
||||||
|
|
Reference in a new issue