Update core.js

fix for add weekday when the initial date is sat.

If you take a Saturday and try to add 1 weekday it will land you on Wednesday, the reason for this is that the date is set to Sunday at the start but the day variable is not updated which causes the conditional "else if (value > 5 || (6-day) <= value)" to erroneously evaluate to true a few lines later.