Restore Date::Manip to quotes modules.

Gnc-fq-helper needs it to parse date and time strings from Finance::Quote.
The comment about using the iso-date field is removed because F::Q no
longer provides it.
This commit is contained in:
John Ralls 2015-07-07 13:02:18 -07:00
parent 5921c63a01
commit 42b3bfbbfe
2 changed files with 27 additions and 30 deletions

34
src/quotes/gnc-fq-helper.in Normal file → Executable file
View File

@ -2,17 +2,17 @@
######################################################################
### gnc-fq-helper - present a scheme interface to Finance::Quote
### Copyright 2001 Rob Browning <rlb@cs.utexas.edu>
###
### This program is free software; you can redistribute it and/or
### modify it under the terms of the GNU General Public License as
### published by the Free Software Foundation; either version 2 of
### the License, or (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
### GNU General Public License for more details.
###
###
### This program is free software; you can redistribute it and/or
### modify it under the terms of the GNU General Public License as
### published by the Free Software Foundation; either version 2 of
### the License, or (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
### along with this program# if not, contact:
###
@ -25,11 +25,7 @@ use strict;
use English;
use FileHandle;
# The following include is needed for the ParseDateString function.
# This should eventually be replaced with a requirement for F::Q
# version 1.11 (or better) and the use of the 'isodate' field to
# handle the date part of the conversion. Still need a method to
# handle the time conversion.
# Date::Manip provides ParseDate, ParseDateString, and UnixTime.
use Date::Manip;
=head1 NAME
@ -122,7 +118,7 @@ non-zero - failure
# signature so this works OK.
sub check_modules {
my @modules = qw(Finance::Quote);
my @modules = qw(Finance::Quote Date::Manip);
my @missing;
foreach my $mod (@modules) {
@ -223,7 +219,7 @@ sub get_quote_time {
my $parsestr = $datestr;
if(!$timestr) {
#fix date handling for quotes with no time.
#fix date handling for quotes with no time.
#Keeps gnucash from getting date wrong in west longitude places.
$parsestr .= " 12:00:00"
} else {
@ -415,7 +411,7 @@ __END__
# $timezone = 0;
# } else {
# return 0;
# }
# }
# }
# sub get_quote_utc {

23
src/quotes/gnc-fq-update.in Normal file → Executable file
View File

@ -2,17 +2,17 @@
######################################################################
### gnc-fq-update - presents a scheme interface to Finance::Quote
### Copyright 2001 Gnumatic, Inc.
###
### This program is free software; you can redistribute it and/or
### modify it under the terms of the GNU General Public License as
### published by the Free Software Foundation; either version 2 of
### the License, or (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
### GNU General Public License for more details.
###
###
### This program is free software; you can redistribute it and/or
### modify it under the terms of the GNU General Public License as
### published by the Free Software Foundation; either version 2 of
### the License, or (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
### along with this program# if not, contact:
###
@ -36,6 +36,7 @@ if ($( != 0) {
exit 0 if ($input ne "y");
}
CPAN::Shell->install('Date::Manip'); #Required by gnc-fq-helper
CPAN::Shell->install('Finance::Quote');
## Local Variables: