Commit fea6b970 by Torkel Ödegaard

Some prep work for using today as relative time, #1186

parent 7e82626b
......@@ -168,14 +168,22 @@ function($, _, moment) {
if(_.isDate(text)) {
return text;
}
var time,
mathString = "",
index,
parseString;
var time;
var mathString = "";
var index;
var parseString;
if (text.substring(0,3) === "now") {
time = new Date();
mathString = text.substring("now".length);
} else {
mathString = text.substring(3);
}
else if (text.substring(0,5) === 'today') {
time = new Date();
time.setHours(0,0,0,0);
mathString = text.substring(5);
}
else {
index = text.indexOf("||");
parseString;
if (index === -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment