/** * Created by knut on 15-01-14. */ var moment = require('moment'); var log = require('../../logger').create(); var dateFormat = ''; var title = ''; var sections = []; var tasks = []; var currentSection = ''; exports.clear = function(){ sections = []; tasks = []; currentSection = ''; title = ''; taskCnt = 0; lastTask = undefined; }; exports.setDateFormat = function(txt){ dateFormat = txt; }; exports.getDateFormat = function(){ return dateFormat; }; exports.setTitle = function(txt){ title = txt; }; exports.getTitle = function(){ return title; }; exports.addSection = function(txt){ currentSection = txt; sections.push(txt); }; exports.findTaskById = function(id) { var i; for(i=0;i