Let glib subtract days from a GDate, because G_DATE_BAD_DAY (0) is a bad day.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13667 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2006-03-18 16:11:40 +00:00
parent ae0f6cf1e7
commit c856521bd3
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2006-03-18 Andreas Köhler <andi5.py@gmx.net>
* src/gnome/dialog-sx-from-trans.c: Let glib subtract days from a
GDate, because G_DATE_BAD_DAY (0) is a bad day.
* src/gnome-utils/gnc-embedded-window.c:
* src/gnome/dialog-sxsincelast.c:
* src/gnome/dialog-scheduledxaction.c: Correct SX editor and Since

View File

@ -720,13 +720,15 @@ sxftd_update_example_cal( SXFromTransInfo *sxfti )
tmp_tt = gnc_date_edit_get_date( sxfti->startDateGDE );
tmpTm = g_new0( struct tm, 1 );
*tmpTm = *localtime( &tmp_tt );
/* go one day before what's in the box so we can get the correct start
* date. */
g_date_set_day( &date, tmpTm->tm_mday-1 );
g_date_set_day( &date, tmpTm->tm_mday );
g_date_set_month( &date, tmpTm->tm_mon+1 );
g_date_set_year( &date, tmpTm->tm_year+1900 );
g_free( tmpTm );
/* go one day before what's in the box so we can get the correct start
* date. */
g_date_subtract_days(&date, 1);
sxftd_update_fs( sxfti, &date, fs );
xaccFreqSpecGetNextInstance( fs, &date, &date );
startDate = date;