Created
January 25, 2013 13:52
-
-
Save Fodsuk/4634610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public bool ValidateExpiryDate(string cardExpiryDate, DateTime lastPaymentDate) | |
{ | |
if (cardExpiryDate == null || !CardDateUtil.FormatIsValid(cardExpiryDate)) return false; | |
DateTime expiryDate = CardDateUtil.ConvertToDateTime(cardExpiryDate, SetDayOfMonth.LastDayOfMonth); | |
var invalidExpiryDate = lastPaymentDate.AddMonths(3); //TODO: pass as variable | |
var inDate = expiryDate >= invalidExpiryDate; | |
return inDate; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment