Commit 4e6bc71f by Rashid Khan

Added year/y to date math parser

parent 18ee2fab
......@@ -316,6 +316,15 @@ function($, _, moment) {
}
unit = mathString.charAt(i++);
switch (unit) {
case 'y':
if (type === 0) {
roundUp ? dateTime.endOf('year') : dateTime.startOf('year');
} else if (type === 1) {
dateTime.add('years',num);
} else if (type === 2) {
dateTime.subtract('years',num);
}
break;
case 'M':
if (type === 0) {
roundUp ? dateTime.endOf('month') : dateTime.startOf('month');
......
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