Thanks to Sarah Reichelt , for pointing out we could replace the long if structure with this one line replacement. Both items give the same result. Optimizing code is always a good thing for many different reasons. Which are all good. Also thanks to Sarah's iRev Site. It gave me some great tips. It is worth exploring. Link
Just replace the if structure with this line.

Date Widget Code version 1

Date Widget Code version 2

There an version 2 example below to replace the if structure with one line of code.
Return to Date Widget

