GnuCash  5.6-150-g038405b370+
Enumerations
gnc-accounting-period.h File Reference

General utilities for dealing with accounting periods. More...

#include <glib.h>
#include <gnc-date.h>

Go to the source code of this file.

Enumerations

enum  GncAccountingPeriod {
  GNC_ACCOUNTING_PERIOD_INVALID = -1, GNC_ACCOUNTING_PERIOD_TODAY, GNC_ACCOUNTING_PERIOD_MONTH, GNC_ACCOUNTING_PERIOD_MONTH_PREV,
  GNC_ACCOUNTING_PERIOD_QUARTER, GNC_ACCOUNTING_PERIOD_QUARTER_PREV, GNC_ACCOUNTING_PERIOD_CYEAR, GNC_ACCOUNTING_PERIOD_CYEAR_PREV,
  GNC_ACCOUNTING_PERIOD_CYEAR_LAST, GNC_ACCOUNTING_PERIOD_FYEAR = GNC_ACCOUNTING_PERIOD_CYEAR_LAST, GNC_ACCOUNTING_PERIOD_FYEAR_PREV, GNC_ACCOUNTING_PERIOD_FYEAR_LAST,
  GNC_ACCOUNTING_PERIOD_LAST = GNC_ACCOUNTING_PERIOD_FYEAR_LAST
}
 This specifies a time interval.
 

Functions

Accounting Periods
GDate * gnc_accounting_period_start_gdate (GncAccountingPeriod which, const GDate *fy_end, const GDate *contains)
 This function returns the starting date for an accounting period. More...
 
GDate * gnc_accounting_period_end_gdate (GncAccountingPeriod which, const GDate *fy_end, const GDate *contains)
 This function returns the ending date for an accounting period. More...
 
time64 gnc_accounting_period_fiscal_start (void)
 
time64 gnc_accounting_period_fiscal_end (void)
 

Detailed Description

General utilities for dealing with accounting periods.

Author
David Hampton hampt.nosp@m.on@e.nosp@m.mploy.nosp@m.ees..nosp@m.org

These are general utility functions for specifying an accounting period and converting it to a value usable by the gnucash engine. The choice of src/app-utils is arbitrary as these utilities don't fit well anywhere else. They are at a higher level than a GDate, so they don't fit in src/core-utils/gnc-gdate-utils.c. They don't operate on engine data structures, so they don't belong in src/engine/Period.c. Putting them into src/engine/gnc-date.c would be the best place for them, but then that creates a new dependency from the src/engine directory to the src/core-utils directory that doesn't currently exist. Since that might be a problem for CashUtils, the app-file directory was chosen.

Definition in file gnc-accounting-period.h.