GnuCash
2.6.99
|
Files | |
file | gnc-gdate-utils.h |
GDate helper routines. | |
GDate time64 setters | |
void | gnc_gdate_set_today (GDate *gd) |
void | gnc_gdate_set_time64 (GDate *gd, time64 time) |
GDate hash table support | |
gint | gnc_gdate_equal (gconstpointer gda, gconstpointer gdb) |
guint | gnc_gdate_hash (gconstpointer gd) |
GDate to time64 conversions | |
time64 | gnc_time64_get_day_start_gdate (const GDate *date) |
time64 | gnc_time64_get_day_end_gdate (const GDate *date) |
Date Manipulation | |
void | gnc_gdate_set_month_start (GDate *date) |
void | gnc_gdate_set_month_end (GDate *date) |
void | gnc_gdate_set_prev_month_start (GDate *date) |
void | gnc_gdate_set_prev_month_end (GDate *date) |
void | gnc_gdate_set_quarter_start (GDate *date) |
void | gnc_gdate_set_quarter_end (GDate *date) |
void | gnc_gdate_set_prev_quarter_start (GDate *date) |
void | gnc_gdate_set_prev_quarter_end (GDate *date) |
void | gnc_gdate_set_year_start (GDate *date) |
void | gnc_gdate_set_year_end (GDate *date) |
void | gnc_gdate_set_prev_year_start (GDate *date) |
void | gnc_gdate_set_prev_year_end (GDate *date) |
void | gnc_gdate_set_fiscal_year_start (GDate *date, const GDate *year_end) |
void | gnc_gdate_set_fiscal_year_end (GDate *date, const GDate *year_end) |
void | gnc_gdate_set_prev_fiscal_year_start (GDate *date, const GDate *year_end) |
void | gnc_gdate_set_prev_fiscal_year_end (GDate *date, const GDate *year_end) |
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.
gint gnc_gdate_equal | ( | gconstpointer | gda, |
gconstpointer | gdb | ||
) |
Compares two GDate*'s for equality; useful for using GDate*'s as GHashTable keys.
Definition at line 48 of file gnc-gdate-utils.c.
guint gnc_gdate_hash | ( | gconstpointer | gd | ) |
Provides a "hash" of a GDate* value; useful for using GDate*'s as GHashTable keys.
Definition at line 54 of file gnc-gdate-utils.c.
void gnc_gdate_set_fiscal_year_end | ( | 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.
date | The GDate to modify. |
year_end | A GDate containing the last month and day of the fiscal year. The year field of this argument is ignored. |
Definition at line 262 of file gnc-gdate-utils.c.
void gnc_gdate_set_fiscal_year_start | ( | GDate * | date, |
const GDate * | year_end | ||
) |
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.
date | The GDate to modify. |
year_end | A GDate containing the last month and day of the fiscal year. The year field of this argument is ignored. |
Definition at line 238 of file gnc-gdate-utils.c.
void gnc_gdate_set_month_end | ( | 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.
date | The GDate to modify. |
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.
date | The GDate to modify. |
Definition at line 113 of file gnc-gdate-utils.c.
void gnc_gdate_set_month_start | ( | GDate * | date | ) |
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.
date | The GDate to modify. |
Definition at line 99 of file gnc-gdate-utils.c.
void gnc_gdate_set_prev_fiscal_year_end | ( | 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.
date | The GDate to modify. |
year_end | A GDate containing the last month and day of the fiscal year. The year field of this argument is ignored. |
Definition at line 296 of file gnc-gdate-utils.c.
void gnc_gdate_set_prev_fiscal_year_start | ( | 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.
date | The GDate to modify. |
year_end | A GDate containing the last month and day of the fiscal year. The year field of this argument is ignored. |
Definition at line 285 of file gnc-gdate-utils.c.
void gnc_gdate_set_prev_month_end | ( | 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.
date | The GDate to modify. |
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.
date | The GDate to modify. |
Definition at line 147 of file gnc-gdate-utils.c.
void gnc_gdate_set_prev_month_start | ( | 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.
date | The GDate to modify. |
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.
date | The GDate to modify. |
Definition at line 132 of file gnc-gdate-utils.c.
void gnc_gdate_set_prev_quarter_end | ( | 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.
date | The GDate to modify. |
Definition at line 196 of file gnc-gdate-utils.c.
void gnc_gdate_set_prev_quarter_start | ( | 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.
date | The GDate to modify. |
Definition at line 188 of file gnc-gdate-utils.c.
void gnc_gdate_set_prev_year_end | ( | 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.
date | The GDate to modify. |
Definition at line 229 of file gnc-gdate-utils.c.
void gnc_gdate_set_prev_year_start | ( | 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.
date | The GDate to modify. |
Definition at line 221 of file gnc-gdate-utils.c.
void gnc_gdate_set_quarter_end | ( | 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.
date | The GDate to modify. |
Definition at line 171 of file gnc-gdate-utils.c.
void gnc_gdate_set_quarter_start | ( | 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.
date | The GDate to modify. |
Definition at line 157 of file gnc-gdate-utils.c.
void gnc_gdate_set_time64 | ( | GDate * | gd, |
time64 | time | ||
) |
Set a GDate to a time64
theGDate | the date to act on |
time | the time to set it to. |
Definition at line 38 of file gnc-gdate-utils.c.
void gnc_gdate_set_today | ( | GDate * | gd | ) |
Set a GDate to the current day
theGDate | The date to act on |
Definition at line 30 of file gnc-gdate-utils.c.
void gnc_gdate_set_year_end | ( | 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.
date | The GDate to modify. |
Definition at line 213 of file gnc-gdate-utils.c.
void gnc_gdate_set_year_start | ( | 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.
date | The GDate to modify. |
Definition at line 205 of file gnc-gdate-utils.c.
time64 gnc_time64_get_day_end_gdate | ( | const GDate * | date | ) |
The gnc_time64_get_day_end() routine will take the given time in GLib GDate format and adjust it to the last second of that day.
Definition at line 78 of file gnc-gdate-utils.c.
time64 gnc_time64_get_day_start_gdate | ( | const GDate * | date | ) |
The gnc_time64_get_day_start() routine will take the given time in GLib GDate format and adjust it to the first second of that day.
Definition at line 64 of file gnc-gdate-utils.c.