mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
ae0f6cf1e7
commit
c856521bd3
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user