GnuCash
2.6.99
|
General utilities for dealing with accounting periods. More...
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 } |
Functions | |
Accounting Periods | |
GDate * | gnc_accounting_period_start_gdate (GncAccountingPeriod which, const GDate *fy_end, const GDate *contains) |
GDate * | gnc_accounting_period_end_gdate (GncAccountingPeriod which, const GDate *fy_end, const GDate *contains) |
time64 | gnc_accounting_period_fiscal_start (void) |
time64 | gnc_accounting_period_fiscal_end (void) |
General utilities for dealing with accounting periods.
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 dependancy 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.