It should return 0 for Sunday.
Can you please give it a try with the latest sandbox build (1753)?
This returns 0 as expected in the JavaScript console:
new DayPilot.Date("2015-06-21").getDayOfWeek();
This also seems to work:
dp.onBeforeCellRender = function(args) {
console.log("dayofweek: " + args.cell.start.getDayOfWeek());
};
Let me know if the problem persists with build 1753.