javascript bug fixed

bug: weekday won't change when date changes