Posted on 2010-05-10 20:42:56.10714-07 by jaiguevara
expiration dates
Here's a question about expiration dates. When I run this code:
my $q=Finance::QuoteOptions->new('IBM'); die 'Retrieve Failed' unless $q->retrieve; print $_->{exp},"\n" foreach @{$q->data};


I get this:
201015 201016 201018 201121 201220 20100521
Direct Responses: 12689 | Write a response
Posted on 2010-05-10 20:50:23.728277-07 by jaiguevara in response to 12688
Re: expiration dates
Oops, I submitted the post before I wrote the question. Is there something I need to do to get the expiration dates in 'YYYYMMDD' format? It looks like I'm getting 'YYYYDD', except for the last which is for May 2010.
Direct Responses: 12690 | Write a response
Posted on 2010-05-10 21:02:49.595986-07 by kbocek in response to 12689
Re: expiration dates
I figured that was your question. :) Yep, looks like a problem. I'll look at this tomorrow. It's been awhile since I looked at the parsing code. It's possible Yahoo shifted things around with the new symbol scheme. I'll post here with anything I find. Kirk Bocek
Direct Responses: 12692 | Write a response
Posted on 2010-05-11 09:04:39.305781-07 by kbocek in response to 12690
Re: expiration dates
Fixed. Version 0.21 has been uploaded to CPAN. I have no idea how long it will take to get vetted and mirrored. Yahoo had changed the months in the date string at the top of the options tables from the short 3-letter version to a full version. I changed the code to parse the full month names. Thanks for catching this. Kirk Bocek
Direct Responses: 12697 | Write a response
Posted on 2010-05-11 11:09:52.662062-07 by jaiguevara in response to 12692
Re: expiration dates
fixed indeed. Thanks for taking the time to do it. - Jay
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.