Sugar
Sugar copied to clipboard
Sugar.Date().valueOf() returns a date object rather than a number
Currently require('sugar').Date().valueOf() returns an object rather a number like javascript new Date().valueOf() or even require('sugar').Date.create().valueOf().
This breaks where you can do stuff like date1 < date2 with javascript dates but not with sugar dates.
Though one could easily work around it, by just using sugar methods or converting to Javascript dates.
Another thing I realised, toJSON is also broken.