Update dateformatter.js

Corrected date calculation for day of week