Skip to content

Commit

Permalink
Bugfix for million vs. billion, and a README noting that terms and
Browse files Browse the repository at this point in the history
conditions of use may apply.
  • Loading branch information
jamiemccarthy committed Jan 2, 2002
1 parent a089ba3 commit bfefbbb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 10 additions & 0 deletions plugins/Stock/README
@@ -0,0 +1,10 @@
Note that reproducing a third party's quotes without their permission
may be prohibited by their terms and conditions, copyright law or other
laws in your area. VA Software, OSDN, and the Slash coders take no
responsibility for how you use or misuse this software. Read the
"perldoc Finance::Quote" page and the perldoc pages from its subclasses
for more information, and if you are in doubt, consult a lawyer. You
may also want to reread the "NO WARRANTY" section of the GPL, which
you can find in the file COPYING, two directories up from this one,
section 11.

6 changes: 2 additions & 4 deletions plugins/Stock/stockquotes.pl
Expand Up @@ -59,10 +59,8 @@
$stock->{year_hi} = sprintf("%.1f", $2);
}
if ($stockfetch{$sym,"cap"} ne ""
and $stockfetch{$sym,"cap"} =~ /([\d.]+)/) {
# XXX something wrong here... market caps seem
# way off, not sure why
$stock->{cap} = sprintf("%.0fM", $1);
and $stockfetch{$sym,"cap"} =~ /([\d.]+)([BM])?/) {
$stock->{cap} = sprintf("%.0f$2", $1);
} else {
$stock->{cap} = "<i>n/a</i>";
}
Expand Down

0 comments on commit bfefbbb

Please sign in to comment.