mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
5921c63a01
commit
42b3bfbbfe
34
src/quotes/gnc-fq-helper.in
Normal file → Executable file
34
src/quotes/gnc-fq-helper.in
Normal file → Executable file
@ -2,17 +2,17 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
### gnc-fq-helper - present a scheme interface to Finance::Quote
|
### gnc-fq-helper - present a scheme interface to Finance::Quote
|
||||||
### Copyright 2001 Rob Browning <rlb@cs.utexas.edu>
|
### Copyright 2001 Rob Browning <rlb@cs.utexas.edu>
|
||||||
###
|
###
|
||||||
### This program is free software; you can redistribute it and/or
|
### This program is free software; you can redistribute it and/or
|
||||||
### modify it under the terms of the GNU General Public License as
|
### modify it under the terms of the GNU General Public License as
|
||||||
### published by the Free Software Foundation; either version 2 of
|
### published by the Free Software Foundation; either version 2 of
|
||||||
### the License, or (at your option) any later version.
|
### the License, or (at your option) any later version.
|
||||||
###
|
###
|
||||||
### This program is distributed in the hope that it will be useful,
|
### This program is distributed in the hope that it will be useful,
|
||||||
### but WITHOUT ANY WARRANTY; without even the implied warranty of
|
### but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
### GNU General Public License for more details.
|
### GNU General Public License for more details.
|
||||||
###
|
###
|
||||||
### You should have received a copy of the GNU General Public License
|
### You should have received a copy of the GNU General Public License
|
||||||
### along with this program# if not, contact:
|
### along with this program# if not, contact:
|
||||||
###
|
###
|
||||||
@ -25,11 +25,7 @@ use strict;
|
|||||||
use English;
|
use English;
|
||||||
use FileHandle;
|
use FileHandle;
|
||||||
|
|
||||||
# The following include is needed for the ParseDateString function.
|
# Date::Manip provides ParseDate, ParseDateString, and UnixTime.
|
||||||
# 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.
|
|
||||||
use Date::Manip;
|
use Date::Manip;
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
@ -122,7 +118,7 @@ non-zero - failure
|
|||||||
# signature so this works OK.
|
# signature so this works OK.
|
||||||
|
|
||||||
sub check_modules {
|
sub check_modules {
|
||||||
my @modules = qw(Finance::Quote);
|
my @modules = qw(Finance::Quote Date::Manip);
|
||||||
my @missing;
|
my @missing;
|
||||||
|
|
||||||
foreach my $mod (@modules) {
|
foreach my $mod (@modules) {
|
||||||
@ -223,7 +219,7 @@ sub get_quote_time {
|
|||||||
|
|
||||||
my $parsestr = $datestr;
|
my $parsestr = $datestr;
|
||||||
if(!$timestr) {
|
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.
|
#Keeps gnucash from getting date wrong in west longitude places.
|
||||||
$parsestr .= " 12:00:00"
|
$parsestr .= " 12:00:00"
|
||||||
} else {
|
} else {
|
||||||
@ -415,7 +411,7 @@ __END__
|
|||||||
# $timezone = 0;
|
# $timezone = 0;
|
||||||
# } else {
|
# } else {
|
||||||
# return 0;
|
# return 0;
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# sub get_quote_utc {
|
# sub get_quote_utc {
|
||||||
|
23
src/quotes/gnc-fq-update.in
Normal file → Executable file
23
src/quotes/gnc-fq-update.in
Normal file → Executable file
@ -2,17 +2,17 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
### gnc-fq-update - presents a scheme interface to Finance::Quote
|
### gnc-fq-update - presents a scheme interface to Finance::Quote
|
||||||
### Copyright 2001 Gnumatic, Inc.
|
### Copyright 2001 Gnumatic, Inc.
|
||||||
###
|
###
|
||||||
### This program is free software; you can redistribute it and/or
|
### This program is free software; you can redistribute it and/or
|
||||||
### modify it under the terms of the GNU General Public License as
|
### modify it under the terms of the GNU General Public License as
|
||||||
### published by the Free Software Foundation; either version 2 of
|
### published by the Free Software Foundation; either version 2 of
|
||||||
### the License, or (at your option) any later version.
|
### the License, or (at your option) any later version.
|
||||||
###
|
###
|
||||||
### This program is distributed in the hope that it will be useful,
|
### This program is distributed in the hope that it will be useful,
|
||||||
### but WITHOUT ANY WARRANTY; without even the implied warranty of
|
### but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
### GNU General Public License for more details.
|
### GNU General Public License for more details.
|
||||||
###
|
###
|
||||||
### You should have received a copy of the GNU General Public License
|
### You should have received a copy of the GNU General Public License
|
||||||
### along with this program# if not, contact:
|
### along with this program# if not, contact:
|
||||||
###
|
###
|
||||||
@ -36,6 +36,7 @@ if ($( != 0) {
|
|||||||
exit 0 if ($input ne "y");
|
exit 0 if ($input ne "y");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CPAN::Shell->install('Date::Manip'); #Required by gnc-fq-helper
|
||||||
CPAN::Shell->install('Finance::Quote');
|
CPAN::Shell->install('Finance::Quote');
|
||||||
|
|
||||||
## Local Variables:
|
## Local Variables:
|
||||||
|
Loading…
Reference in New Issue
Block a user