[Gnucash-changes] Collect gdate related functions into a common file.

David Hampton hampton at cvs.gnucash.org
Mon Sep 26 21:17:14 EDT 2005


Log Message:
-----------
Collect gdate related functions into a common file.  Add a bunch of
gdate modification functions.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/app-utils:
        gnc-helpers.c
        gnc-helpers.h
    gnucash/src/core-utils:
        Makefile.am
    gnucash/src/engine:
        gnc-date.c
        gnc-date.h
    gnucash/src/gnome:
        druid-acct-period.c
        druid-loan.c

Added Files:
-----------
    gnucash/src/core-utils:
        gnc-gdate-utils.c
        gnc-gdate-utils.h

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.292
retrieving revision 1.1487.2.293
diff -LChangeLog -LChangeLog -u -r1.1487.2.292 -r1.1487.2.293
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,13 @@
+2005-09-26  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/gnc-helpers.[ch]:
+	* src/core-utils/Makefile.am:
+	* src/core-utils/gnc-gdate-utils.[ch]:
+	* src/engine/gnc-date.[ch]:
+	* src/gnome/druid-acct-period.c:
+	* src/gnome/druid-loan.c: Collect gdate related functions into a
+	common file.  Add a bunch of gdate modification functions.
+
 2005-09-25  David Hampton  <hampton at employees.org>
 
 	* src/app-utils/global-options.c:
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/core-utils/Makefile.am,v
retrieving revision 1.7.4.5
retrieving revision 1.7.4.6
diff -Lsrc/core-utils/Makefile.am -Lsrc/core-utils/Makefile.am -u -r1.7.4.5 -r1.7.4.6
--- src/core-utils/Makefile.am
+++ src/core-utils/Makefile.am
@@ -3,6 +3,7 @@
 
 libcore_utils_la_SOURCES = \
   gnc-gconf-utils.c \
+  gnc-gdate-utils.c \
   gnc-gobject-utils.c
 
 libcore_utils_la_LDFLAGS = -module
@@ -22,6 +23,7 @@
 
 noinst_HEADERS = \
   gnc-gconf-utils.h \
+  gnc-gdate-utils.h \
   gnc-gobject-utils.h \
   gw-core-utils.h
 
--- /dev/null
+++ src/core-utils/gnc-gdate-utils.h
@@ -0,0 +1,227 @@
+/*
+ * gnc-gdate-utils.h -- utility functions for manipulating
+ *              GDate data structures from GLib
+ * Copyright (C) 2005 David Hampton <hampton at employees.org>
+ *
+ * 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:
+ *
+ * Free Software Foundation           Voice:  +1-617-542-5942
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org
+ */
+
+/** @addtogroup GLib
+    @{ */
+/** @addtogroup GDate GDate Utilities
+
+    This file provides routines that help make it easier to use GDates
+    from within Gnucash.  A GDate is a data strucutre provided by GLib
+    that handles dates from year 1 to year 9999.
+
+    @{ */
+/** @file gnc-gdate-utils.h
+ *  @brief GDate helper routines.
+ *  @author Copyright (C) 2005 David Hampton <hampton at employees.org>
+ */
+
+#ifndef GNC_GDATE_UTILS_H
+#define GNC_GDATE_UTILS_H
+
+
+/** @name GDate hash table support
+    @{ */
+
+/** Compares two GDate*'s for equality; useful for using GDate*'s as
+ *  GHashTable keys. */
+gint g_date_equals( gconstpointer gda, gconstpointer gdb );
+
+
+/** Provides a "hash" of a GDate* value; useful for using GDate*'s as
+ *  GHashTable keys. */
+guint g_date_hash( gconstpointer gd );
+
+/** @} */
+
+/** @name GDate to time_t conversions
+    @{ */
+
+/** The gnc_timet_get_day_start() routine will take the given time in
+ *  GLib GDate format and adjust it to the first second of that day.
+ */
+time_t gnc_timet_get_day_start_gdate (GDate *date);
+
+/** The gnc_timet_get_day_end() routine will take the given time in
+ *  GLib GDate format and adjust it to the last second of that day.
+ */
+time_t gnc_timet_get_day_end_gdate (GDate *date);
+
+/** @} */
+
+/** @name Date Manipulation
+    @{ */
+
+/** This function modifies a GDate to set it to the first day of the
+ *  month in which it falls.  For example, if this function is called
+ *  with a date of 2003-09-24 the date will be modified to 2003-09-01.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_month_start (GDate *date);
+
+
+/** This function modifies a GDate to set it to the last day of the
+ *  month in which it falls.  For example, if this function is called
+ *  with a date of 2003-09-24 the date will be modified to 2003-09-30.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_month_end (GDate *date);
+
+
+/** This function modifies a GDate to set it to the first day of the
+ *  month prior to the one in which it falls.  For example, if this
+ *  function is called with a date of 2003-09-24 the date will be
+ *  modified to 2003-08-01.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_prev_month_start (GDate *date);
+
+
+/** This function modifies a GDate to set it to the last day of the
+ *  month prior to the one in which it falls.  For example, if this
+ *  function is called with a date of 2003-09-24 the date will be
+ *  modified to 2003-08-31.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_prev_month_end (GDate *date);
+
+
+/** This function modifies a GDate to set it to the first day of the
+ *  quarter in which it falls.  For example, if this function is called
+ *  with a date of 2003-09-24 the date will be modified to 2003-09-01.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_quarter_start (GDate *date);
+
+
+/** This function modifies a GDate to set it to the last day of the
+ *  quarter in which it falls.  For example, if this function is called
+ *  with a date of 2003-09-24 the date will be modified to 2003-12-31.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_quarter_end (GDate *date);
+
+
+/** This function modifies a GDate to set it to the first day of the
+ *  quarter prior to the one in which it falls.  For example, if this
+ *  function is called with a date of 2003-09-24 the date will be
+ *  modified to 2003-06-01.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_prev_quarter_start (GDate *date);
+
+
+/** This function modifies a GDate to set it to the last day of the
+ *  quarter prior to the one in which it falls.  For example, if this
+ *  function is called with a date of 2003-09-24 the date will be
+ *  modified to 2003-07-31.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_prev_quarter_end (GDate *date);
+
+
+/** This function modifies a GDate to set it to the first day of the
+ *  year in which it falls.  For example, if this function is called
+ *  with a date of 2003-09-24 the date will be modified to 2003-01-01.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_year_start (GDate *date);
+
+
+/** This function modifies a GDate to set it to the last day of the
+ *  year in which it falls.  For example, if this function is called
+ *  with a date of 2003-09-24 the date will be modified to 2003-12-31.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_year_end (GDate *date);
+
+
+/** This function modifies a GDate to set it to the first day of the
+ *  year prior to the one in which it falls.  For example, if this
+ *  function is called with a date of 2003-09-24 the date will be
+ *  modified to 2002-01-01.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_prev_year_start (GDate *date);
+
+
+/** This function modifies a GDate to set it to the last day of the
+ *  year prior to the one in which it falls.  For example, if this
+ *  function is called with a date of 2003-09-24 the date will be
+ *  modified to 2002-12-31.
+ *
+ *  @param date The GDate to modify. */
+void gnc_gdate_set_prev_year_end (GDate *date);
+
+
+/** This function modifies a GDate to set it to the first day of the
+ *  fiscal year in which it falls.  For example, if this function is
+ *  called with a date of 2003-09-24 and a fiscal year ending July
+ *  31st, the date will be modified to 2003-08-01.
+ *
+ *  @param date The GDate to modify.
+ *
+ *  @param year_end A GDate containing the last month and day of the
+ *  fiscal year.  The year field of this argument is ignored. */
+void gnc_gdate_set_fiscal_year_start (GDate *date, const GDate *year_end);
+
+
+/** This function modifies a GDate to set it to the last day of the
+ *  fiscal year in which it falls.  For example, if this function is
+ *  called with a date of 2003-09-24 and a fiscal year ending July
+ *  31st, the date will be modified to 2004-07-31.
+ *
+ *  @param date The GDate to modify.
+ *
+ *  @param year_end A GDate containing the last month and day of the
+ *  fiscal year.  The year field of this argument is ignored. */
+void gnc_gdate_set_fiscal_year_end (GDate *date, const GDate *year_end);
+
+
+/** This function modifies a GDate to set it to the first day of the
+ *  fiscal year prior to the one in which it falls.  For example, if
+ *  this function is called with a date of 2003-09-24 and a fiscal
+ *  year ending July 31st, the date will be modified to 2002-08-01.
+ *
+ *  @param date The GDate to modify.
+ *
+ *  @param year_end A GDate containing the last month and day of the
+ *  fiscal year.  The year field of this argument is ignored. */
+void gnc_gdate_set_prev_fiscal_year_start (GDate *date, const GDate *year_end);
+
+
+/** This function modifies a GDate to set it to the last day of the
+ *  fiscal year prior to the one in which it falls.  For example, if
+ *  this function is called with a date of 2003-09-24 and a fiscal
+ *  year ending July 31st, the date will be modified to 2003-07-31.
+ *
+ *  @param date The GDate to modify.
+ *
+ *  @param year_end A GDate containing the last month and day of the
+ *  fiscal year.  The year field of this argument is ignored. */
+void gnc_gdate_set_prev_fiscal_year_end (GDate *date, const GDate *year_end);
+
+/** @} */
+
+#endif /* GNC_GDATE_UTILS_H */
+/** @} */
+/** @} */
--- /dev/null
+++ src/core-utils/gnc-gdate-utils.c
@@ -0,0 +1,297 @@
+/*
+ * gnc-gdate-utils.c -- utility functions for manipulating
+ *              GDate data structures from GLib
+ * Copyright (C) 2005 David Hampton <hampton at employees.org>
+ *
+ * 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:
+ *
+ * Free Software Foundation           Voice:  +1-617-542-5942
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org
+ */
+
+#include "config.h"
+#include <glib.h>
+#include <time.h>
+
+#include "gnc-gdate-utils.h"
+
+
+gint
+g_date_equals( gconstpointer gda, gconstpointer gdb )
+{
+  if ( !g_date_valid( (GDate*)gda )
+       || !g_date_valid( (GDate*)gdb ) ) {
+#if 0
+    DEBUG( "invalid: %p(%s), %p(%s)",
+           gda, ( g_date_valid((GDate*)gda) ? "" : "*" ),
+           gdb, ( g_date_valid((GDate*)gdb) ? "" : "*" ) );
+#endif
+  }
+  return ( g_date_compare( (GDate*)gda, (GDate*)gdb )
+           == 0 ? TRUE : FALSE );
+}
+
+guint
+g_date_hash( gconstpointer gd )
+{
+  gint val = (g_date_year( (GDate*)gd ) * 10000)
+    + (g_date_month( (GDate*)gd ) * 100)
+    + g_date_day( (GDate*)gd );
+  return g_int_hash( &val );
+}
+
+
+time_t
+gnc_timet_get_day_start_gdate (GDate *date)
+{
+  struct tm stm;
+  time_t secs;
+
+  /* First convert to a 'struct tm' */
+  g_date_to_struct_tm(date, &stm);
+
+  /* Then convert to number of seconds */
+  secs = mktime (&stm);
+  return secs;
+}
+
+time_t
+gnc_timet_get_day_end_gdate (GDate *date)
+{
+  struct tm stm;
+  time_t secs;
+
+  /* First convert to a 'struct tm' */
+  g_date_to_struct_tm(date, &stm);
+
+  /* Force to th last second of the day */
+  stm.tm_hour = 23;
+  stm.tm_min = 59;
+  stm.tm_sec = 59;
+  stm.tm_isdst = -1;
+
+  /* Then convert to number of seconds */
+  secs = mktime (&stm);
+  return secs;
+}
+
+
+void
+gnc_gdate_set_month_start (GDate *date)
+{
+  g_date_set_day(date, 1);
+}
+
+
+/** Convert a GDate to the last day of the month.  This routine has no
+ *  knowledge of how many days are in a month, whether its a leap
+ *  year, etc.  All that information is contained in the glib date
+ *  functions.
+ *  
+ *  @param date The GDate to modify.
+ */
+void
+gnc_gdate_set_month_end (GDate *date)
+{
+  /* First set the start of next month. */
+  g_date_set_day(date, 1);
+  g_date_add_months(date, 1);
+
+  /* Then back up one day */
+  g_date_subtract_days(date, 1);
+}
+
+
+/** Convert a GDate to the first day of the prebvious month.  This
+ *  routine has no knowledge of how many days are in a month, whether
+ *  its a leap year, etc.  All that information is contained in the
+ *  glib date functions.
+ *  
+ *  @param date The GDate to modify.
+ */
+void
+gnc_gdate_set_prev_month_start (GDate *date)
+{
+  g_date_set_day(date, 1);
+  g_date_subtract_months(date, 1);
+}
+
+
+/** Convert a GDate to the last day of the prebvious month.  This
+ *  routine has no knowledge of how many days are in a month, whether
+ *  its a leap year, etc.  All that information is contained in the
+ *  glib date functions.
+ *  
+ *  @param date The GDate to modify.
+ */
+void
+gnc_gdate_set_prev_month_end (GDate *date)
+{
+  /* This will correctly handle the varying month lengths */
+  g_date_set_day(date, 1);
+  g_date_subtract_days(date, 1);
+}
+
+/* ========== */
+
+void
+gnc_gdate_set_quarter_start (GDate *date)
+{
+  gint months;
+
+  /* Set the date to the first day of the specified month. */
+  g_date_set_day(date, 1);
+
+  /* Back up 0-2 months */ 
+  months = (g_date_get_month(date) - G_DATE_JANUARY) % 3;
+  g_date_subtract_months(date, months);
+}
+
+
+void
+gnc_gdate_set_quarter_end (GDate *date)
+{
+  gint months;
+
+  /* Set the date to the first day of the specified month. */
+  g_date_set_day(date, 1);
+
+  /* Add 1-3 months to get the first day of the next quarter.*/
+  months = (g_date_get_month(date) - G_DATE_JANUARY) % 3;
+  g_date_add_months(date, 3 - months);
+
+  /* Now back up one day */
+  g_date_subtract_days(date, 1);
+}
+
+
+void
+gnc_gdate_set_prev_quarter_start (GDate *date)
+{
+  gnc_gdate_set_quarter_start(date);
+  g_date_subtract_months(date, 3);
+}
+
+
+void
+gnc_gdate_set_prev_quarter_end (GDate *date)
+{
+  gnc_gdate_set_quarter_end(date);
+  g_date_subtract_months(date, 3);
+}
+
+/* ========== */
+
+void
+gnc_gdate_set_year_start (GDate *date)
+{
+  g_date_set_month(date, G_DATE_JANUARY);
+  g_date_set_day(date, 1);
+}
+
+
+void
+gnc_gdate_set_year_end (GDate *date)
+{
+  g_date_set_month(date, G_DATE_DECEMBER);
+  g_date_set_day(date, 31);
+}
+
+
+void
+gnc_gdate_set_prev_year_start (GDate *date)
+{
+  gnc_gdate_set_year_start(date);
+  g_date_subtract_years(date, 1);
+}
+
+
+void
+gnc_gdate_set_prev_year_end (GDate *date)
+{
+  gnc_gdate_set_year_end(date);
+  g_date_subtract_years(date, 1);
+}
+
+/* ========== */
+
+void
+gnc_gdate_set_fiscal_year_start (GDate *date,
+				const GDate *fy_end)
+{
+  GDate temp;
+  gboolean new_fy;
+
+  g_return_if_fail(date);
+  g_return_if_fail(fy_end);
+
+  /* Compute the FY end that occurred this CY */
+  temp = *fy_end;
+  g_date_set_year(&temp, g_date_get_year(date));
+
+  /* Has it already passed? */
+  new_fy = (g_date_compare(date, &temp) > 0);
+
+  /* Set start date */
+  *date = temp;
+  g_date_add_days(date, 1);
+  if (!new_fy)
+    g_date_subtract_years(date, 1);
+}
+
+void
+gnc_gdate_set_fiscal_year_end (GDate *date,
+			      const GDate *fy_end)
+{
+  GDate temp;
+  gboolean new_fy;
+
+  g_return_if_fail(date);
+  g_return_if_fail(fy_end);
+
+  /* Compute the FY end that occurred this CY */
+  temp = *fy_end;
+  g_date_set_year(&temp, g_date_get_year(date));
+
+  /* Has it already passed? */
+  new_fy = (g_date_compare(date, &temp) > 0);
+
+  /* Set end date */
+  *date = temp;
+  if (new_fy)
+    g_date_add_years(date, 1);
+}
+
+void
+gnc_gdate_set_prev_fiscal_year_start (GDate *date,
+				     const GDate *fy_end)
+{
+  g_return_if_fail(date);
+  g_return_if_fail(fy_end);
+
+  gnc_gdate_set_fiscal_year_start(date, fy_end);
+  g_date_subtract_years(date, 1);
+}
+
+void
+gnc_gdate_set_prev_fiscal_year_end (GDate *date,
+				   const GDate *fy_end)
+{
+  g_return_if_fail(date);
+  g_return_if_fail(fy_end);
+
+  gnc_gdate_set_fiscal_year_end(date, fy_end);
+  g_date_subtract_years(date, 1);
+}
Index: gnc-date.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-date.h,v
retrieving revision 1.6.2.7
retrieving revision 1.6.2.8
diff -Lsrc/engine/gnc-date.h -Lsrc/engine/gnc-date.h -u -r1.6.2.7 -r1.6.2.8
--- src/engine/gnc-date.h
+++ src/engine/gnc-date.h
@@ -479,13 +479,21 @@
  *  seconds and adjust it to the last second of that day. */
 time_t gnc_timet_get_day_end(time_t time_val);
 
+#ifndef GNUCASH_MAJOR_VERSION
 /** The gnc_timet_get_day_start() routine will take the given time in
- *  GLib GDate format and adjust it to the last second of that day. */
+ *  GLib GDate format and adjust it to the last second of that day.
+ *
+ *  @deprecated
+ */
 time_t gnc_timet_get_day_start_gdate (GDate *date);
 
 /** The gnc_timet_get_day_end() routine will take the given time in
- *  GLib GDate format and adjust it to the last second of that day. */
+ *  GLib GDate format and adjust it to the last second of that day.
+ *
+ *  @deprecated
+ */
 time_t gnc_timet_get_day_end_gdate (GDate *date);
+#endif /* GNUCASH_MAJOR_VERSION */
 
 /** Get the numerical last date of the month. (28, 29, 30, 31) */
 int date_get_last_mday(struct tm *tm);
Index: gnc-date.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-date.c,v
retrieving revision 1.6.2.8
retrieving revision 1.6.2.9
diff -Lsrc/engine/gnc-date.c -Lsrc/engine/gnc-date.c -u -r1.6.2.8 -r1.6.2.9
--- src/engine/gnc-date.c
+++ src/engine/gnc-date.c
@@ -1321,6 +1321,8 @@
   return mktime(&tm);
 }
 
+
+#ifndef GNUCASH_MAJOR_VERSION
 time_t
 gnc_timet_get_day_start_gdate (GDate *date)
 {
@@ -1352,6 +1354,7 @@
   secs = mktime (&stm);
   return secs;
 }
+#endif /* GNUCASH_MAJOR_VERSION */
 
 /* ======================================================== */
 
Index: gnc-helpers.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-helpers.c,v
retrieving revision 1.7.4.2
retrieving revision 1.7.4.3
diff -Lsrc/app-utils/gnc-helpers.c -Lsrc/app-utils/gnc-helpers.c -u -r1.7.4.2 -r1.7.4.3
--- src/app-utils/gnc-helpers.c
+++ src/app-utils/gnc-helpers.c
@@ -35,8 +35,6 @@
 #include "global-options.h"
 
 
-static short module = MOD_SX;
-
 /* Type converters for GNCPrintAmountInfo */
 SCM
 gnc_printinfo2scm(GNCPrintAmountInfo info)
@@ -181,25 +179,3 @@
 
   return gnc_numeric_to_scm (result);
 }
-
-gint
-g_date_equals( gconstpointer gda, gconstpointer gdb )
-{
-  if ( !g_date_valid( (GDate*)gda )
-       || !g_date_valid( (GDate*)gdb ) ) {
-    DEBUG( "invalid: %p(%s), %p(%s)",
-           gda, ( g_date_valid((GDate*)gda) ? "" : "*" ),
-           gdb, ( g_date_valid((GDate*)gdb) ? "" : "*" ) );
-  }
-  return ( g_date_compare( (GDate*)gda, (GDate*)gdb )
-           == 0 ? TRUE : FALSE );
-}
-
-guint
-g_date_hash( gconstpointer gd )
-{
-  gint val = (g_date_year( (GDate*)gd ) * 10000)
-    + (g_date_month( (GDate*)gd ) * 100)
-    + g_date_day( (GDate*)gd );
-  return g_int_hash( &val );
-}
Index: gnc-helpers.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-helpers.h,v
retrieving revision 1.4.4.1
retrieving revision 1.4.4.2
diff -Lsrc/app-utils/gnc-helpers.h -Lsrc/app-utils/gnc-helpers.h -u -r1.4.4.1 -r1.4.4.2
--- src/app-utils/gnc-helpers.h
+++ src/app-utils/gnc-helpers.h
@@ -47,15 +47,4 @@
 
 SCM gnc_parse_amount_helper (const char * string, gboolean monetary);
 
-/**
- * Compares two GDate*'s for equality; useful for using GDate*'s as
- * GHashTable keys.
- **/
-gint g_date_equals( gconstpointer gda, gconstpointer gdb );
-/**
- * Provides a "hash" of a GDate* value; useful for using GDate*'s as
- * GHashTable keys.
- **/
-guint g_date_hash( gconstpointer gd );
-
 #endif
Index: druid-acct-period.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-acct-period.c,v
retrieving revision 1.8.2.4
retrieving revision 1.8.2.5
diff -Lsrc/gnome/druid-acct-period.c -Lsrc/gnome/druid-acct-period.c -u -r1.8.2.4 -r1.8.2.5
--- src/gnome/druid-acct-period.c
+++ src/gnome/druid-acct-period.c
@@ -42,6 +42,7 @@
 #include "gnc-date.h"
 #include "gnc-file.h"
 #include "gnc-frequency.h"
+#include "gnc-gdate-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-trace.h"
 #include "gnc-ui-util.h"
Index: druid-loan.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-loan.c,v
retrieving revision 1.17.4.7
retrieving revision 1.17.4.8
diff -Lsrc/gnome/druid-loan.c -Lsrc/gnome/druid-loan.c -u -r1.17.4.7 -r1.17.4.8
--- src/gnome/druid-loan.c
+++ src/gnome/druid-loan.c
@@ -49,7 +49,7 @@
 #include "Account.h"
 #include "FreqSpec.h"
 #include "gnc-ui.h"
-#include "gnc-helpers.h"
+#include "gnc-gdate-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
 #include "gnc-frequency.h"


More information about the gnucash-changes mailing list