Date.sub method bug with "M" and "y" options

Attempts to subtract either months or years results in add instead of subtract. Other options - seconds, minutes, hours, days and weeks, work as expected. Sample code and output:

var d =; DOpus.output(d); var dadd = d.clone; dadd.add(1,"y"); DOpus.output(dadd); var dsub = d.clone; dsub.sub(1,"y"); DOpus.output(dsub);
23/11/2016 14:58:13
23/11/2017 14:58:13
23/11/2017 14:58:13 - Should be 2015

Regards, AB

A workaround is to add a negative quantum - e.g. dadd.add(-1,"y");

Regards, AB

Thanks! This will be fixed in the next update.