Weekday to number conversion

Let me know if there is a better place to include these little utilities in the code base, or if this one needs improvement.