diff options
| author | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-06-30 10:37:11 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-06-30 10:39:46 -0400 |
| commit | 6b0a14370d244d4ff3b6277c49a23b04b8957678 (patch) | |
| tree | 53cf3a2a557e7d746c2d5a6e89c241c631e4dcad /date.pyx | |
| parent | 41fad2c2e88ef770b22c62c916cf6c5c68268836 (diff) | |
| download | pyisda-6b0a14370d244d4ff3b6277c49a23b04b8957678.tar.gz | |
fix some maturities, still not matching :(
Diffstat (limited to 'date.pyx')
| -rw-r--r-- | date.pyx | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4,3 +4,8 @@ from date cimport JpmcdsDate cdef TDate pydate_to_TDate(d): assert isinstance(d, datetime.date) return JpmcdsDate(d.year, d.month, d.day) + +cpdef object TDate_to_pydate(TDate d): + cdef TMonthDayYear date + if JpmcdsDateToMDY(d, &date) == 0: + return datetime.date(date.year, date.month, date.day) |
