GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-accounting-period.h
Go to the documentation of this file.
1 /*
2  * gnc-accounting-period.h --
3  *
4  * Copyright (c) 2005 David Hampton <[email protected]>
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 [email protected]
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 
53 typedef enum
54 {
55  GNC_ACCOUNTING_PERIOD_INVALID = -1, //Force Clang to use a signed enum
56  GNC_ACCOUNTING_PERIOD_TODAY,
57  GNC_ACCOUNTING_PERIOD_MONTH,
58  GNC_ACCOUNTING_PERIOD_MONTH_PREV,
59  GNC_ACCOUNTING_PERIOD_QUARTER,
60  GNC_ACCOUNTING_PERIOD_QUARTER_PREV,
61  GNC_ACCOUNTING_PERIOD_CYEAR,
62  GNC_ACCOUNTING_PERIOD_CYEAR_PREV,
63  GNC_ACCOUNTING_PERIOD_CYEAR_LAST,
64 
65  GNC_ACCOUNTING_PERIOD_FYEAR = GNC_ACCOUNTING_PERIOD_CYEAR_LAST,
66  GNC_ACCOUNTING_PERIOD_FYEAR_PREV,
67  GNC_ACCOUNTING_PERIOD_FYEAR_LAST,
68  GNC_ACCOUNTING_PERIOD_LAST = GNC_ACCOUNTING_PERIOD_FYEAR_LAST,
70 
71 
95  const GDate *fy_end,
96  const GDate *contains);
117  const GDate *fy_end,
118  const GDate *contains);
119 
120 /* Get the fiscal accounting period from the preferences and return
121  the start and end times. */
122 time64 gnc_accounting_period_fiscal_start(void);
123 time64 gnc_accounting_period_fiscal_end(void);
124 
127 #endif /* GNC_ACCOUNTING_PERIOD_H */
128 
Date and Time handling routines.
GncAccountingPeriod
GDate * gnc_accounting_period_end_gdate(GncAccountingPeriod which, const GDate *fy_end, const GDate *contains)
GDate * gnc_accounting_period_start_gdate(GncAccountingPeriod which, const GDate *fy_end, const GDate *contains)
gint64 time64
Definition: gnc-date.h:83