Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beginner prog help....

Status
Not open for further replies.

terrydeL

Programmer
Nov 7, 2002
1
IE
I am looking for help with a programme to count the number of Friday 13ths in a calender year. I've no idea where to start? Any ideas greatly aapreciated.
 
there are ways to calculate what day of the week it is by the date


you could use that then plug in the 13th of every month of a given year and see how many you have --

altenatively you could call the calendar function via a system call and pipe the out put to a file(i.e. on unix its system("cal 11 2002 > tmp.txt");//prints calender for november 2002 ) then parse the file and determine if the 13th lies on a friday.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top