How to get day of week?
In this example we want to create a calendar / date from year and day of the year, because that's all we have. Next we will find what is the day of week of the calendar object is. Let's see the example below.
Below is the result of our program.
Fri Jun 29 17:16:22 ICT 2007