python - Decipher date serial number in Yahoo Finance -
i need deciphering date number @ end of url: view-source:http://finance.yahoo.com/q/op?s=xom&date=1434672000 -- doesn't proleptic gregorian serial number, in yahoo designates june 19, 2015. goal write python code segment create valid yahoo date number input of yyyymmdd, can generate valid url stock ticker symbol (not xom) , option expiration date expressed yyyymmdd. thanks!
that's unix timestamp -- number of seconds since january 1, 1970.
>>> time.gmtime(1434672000) time.struct_time(tm_year=2015, tm_mon=6, tm_mday=19, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=4, tm_yday=170, tm_isdst=0)
Comments
Post a Comment