gnucash maint: Restore Date::Manip to quotes modules.

John Ralls jralls at code.gnucash.org
Tue Jul 7 16:02:37 EDT 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/42b3bfbb (commit)
	from  https://github.com/Gnucash/gnucash/commit/5921c63a (commit)



commit 42b3bfbbfe3c67d3c9cbfee6035ef9d2b8afc061
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 7 13:02:18 2015 -0700

    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.

diff --git a/src/quotes/gnc-fq-helper.in b/src/quotes/gnc-fq-helper.in
old mode 100644
new mode 100755
index f6759bb..c2c91d4
--- a/src/quotes/gnc-fq-helper.in
+++ b/src/quotes/gnc-fq-helper.in
@@ -2,17 +2,17 @@
 ######################################################################
 ### gnc-fq-helper - present a scheme interface to Finance::Quote
 ### Copyright 2001 Rob Browning <rlb at 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 {
diff --git a/src/quotes/gnc-fq-update.in b/src/quotes/gnc-fq-update.in
old mode 100644
new mode 100755
index 3aed182..2002086
--- a/src/quotes/gnc-fq-update.in
+++ b/src/quotes/gnc-fq-update.in
@@ -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:



Summary of changes:
 src/quotes/gnc-fq-helper.in | 34 +++++++++++++++-------------------
 src/quotes/gnc-fq-update.in | 23 ++++++++++++-----------
 2 files changed, 27 insertions(+), 30 deletions(-)
 mode change 100644 => 100755 src/quotes/gnc-fq-helper.in
 mode change 100644 => 100755 src/quotes/gnc-fq-update.in



More information about the gnucash-changes mailing list