GnuCash 2.4.99
Enumerations
gnc-accounting-period.h File Reference

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

#include <glib.h>
#include <time.h>

Go to the source code of this file.

Enumerations

enum  GncAccountingPeriod {
  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)
time_t gnc_accounting_period_start_timet (GncAccountingPeriod which, const GDate *fy_end, const GDate *contains)
GDate * gnc_accounting_period_end_gdate (GncAccountingPeriod which, const GDate *fy_end, const GDate *contains)
time_t gnc_accounting_period_end_timet (GncAccountingPeriod which, const GDate *fy_end, const GDate *contains)
time_t gnc_accounting_period_fiscal_start (void)
time_t gnc_accounting_period_fiscal_end (void)

Detailed Description

General utilities for dealing with accounting periods.

Author:
David Hampton <hampton@employees.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 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.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines