Home › Forums › C Programming › license validation › Re: Re: license validation
May 4, 2009 at 5:48 pm
#3563
GWILouisaxwzkla
Participant
If you want to see if a date is less than another , I would do:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <br /> if ( expirationYear > licenseYear )<br /> licenseValid = true;<br /> else if ( expirationYear == licenseYear )<br /> {<br /> if ( expirationMonth > licenseMonth )<br /> licenseValid = true;<br /> else if ( expirationMonth == licenseMonth )<br /> {<br /> if ( expirationDay > licenseDay )<br /> licenseValid = true;<br /> else if ( expirationDay == licenseDay )<br /> licenseValid = true;<br /> else<br /> licenseValid = false;<br /> }<br /> else<br /> licenseValid = false;<br /> }<br /> else<br /> licenseValid = false;<br /> <br /> <br /> |