GnuCash  5.6-150-g038405b370+
gnc-accounting-period.h
Go to the documentation of this file.
1 /*
2  * gnc-accounting-period.h --
3  *
4  * Copyright (c) 2005 David Hampton <hampton@employees.org>
5  * All rights reserved.
6  *
7  * GnuCash is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Library General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * Gnucash is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, contact:
19  *
20  * Free Software Foundation Voice: +1-617-542-5942
21  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
22  * Boston, MA 02110-1301, USA gnu@gnu.org
23  */
24 
44 #ifndef GNC_ACCOUNTING_PERIOD_H
45 #define GNC_ACCOUNTING_PERIOD_H
46 
47 #include <glib.h>
48 #include <gnc-date.h>
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
57 typedef enum
58 {
59  GNC_ACCOUNTING_PERIOD_INVALID = -1, //Force Clang to use a signed enum
60  GNC_ACCOUNTING_PERIOD_TODAY,
61  GNC_ACCOUNTING_PERIOD_MONTH,
62  GNC_ACCOUNTING_PERIOD_MONTH_PREV,
63  GNC_ACCOUNTING_PERIOD_QUARTER,
64  GNC_ACCOUNTING_PERIOD_QUARTER_PREV,
65  GNC_ACCOUNTING_PERIOD_CYEAR,
66  GNC_ACCOUNTING_PERIOD_CYEAR_PREV,
67  GNC_ACCOUNTING_PERIOD_CYEAR_LAST,
68 
69  GNC_ACCOUNTING_PERIOD_FYEAR = GNC_ACCOUNTING_PERIOD_CYEAR_LAST,
70  GNC_ACCOUNTING_PERIOD_FYEAR_PREV,
71  GNC_ACCOUNTING_PERIOD_FYEAR_LAST,
72  GNC_ACCOUNTING_PERIOD_LAST = GNC_ACCOUNTING_PERIOD_FYEAR_LAST,
74 
75 
99  const GDate *fy_end,
100  const GDate *contains);
101 
122  const GDate *fy_end,
123  const GDate *contains);
124 
125 /* Get the fiscal accounting period from the preferences and return
126  the start and end times. */
127 time64 gnc_accounting_period_fiscal_start (void);
128 time64 gnc_accounting_period_fiscal_end (void);
129 
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif /* GNC_ACCOUNTING_PERIOD_H */
137 
Date and Time handling routines.
GncAccountingPeriod
This specifies a time interval.
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.
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.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition: gnc-date.h:87