Created
December 8, 2011 08:11
-
-
Save stim371/1446435 to your computer and use it in GitHub Desktop.
callback to enter the proper expiration date for the option contract being saved
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
def calc_exp_date | |
expirationdate.wday == 6 ? self.expirationdate = expirationdate+(21) : self.expirationdate = expirationdate+(14 + 6 - expirationdate.wday) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment