Validating Custom Dates in my own game
Posted: Fri Aug 15, 2003 3:33 pm
In my game I want to use
type curGame
day as integer
week as integer
month as integer
year as integer
end type
You play each 'day' and the day is incremented at the end of each day (thus incrementing the week, month, etc).
Now how do I validate my day/week/month/year to ensure that the date I've displayed is a valid one?
For example it should detect where there are 30/31 days in a month or whether its a leap-year?
Is there a way of validating the date perhaps against a calendar?
Thanks.
type curGame
day as integer
week as integer
month as integer
year as integer
end type
You play each 'day' and the day is incremented at the end of each day (thus incrementing the week, month, etc).
Now how do I validate my day/week/month/year to ensure that the date I've displayed is a valid one?
For example it should detect where there are 30/31 days in a month or whether its a leap-year?
Is there a way of validating the date perhaps against a calendar?
Thanks.