GnuCash  4.12-404-geb24099a91
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 
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);
97 
118  const GDate *fy_end,
119  const GDate *contains);
120 
121 /* Get the fiscal accounting period from the preferences and return
122  the start and end times. */
123 time64 gnc_accounting_period_fiscal_start (void);
124 time64 gnc_accounting_period_fiscal_end (void);
125 
128 #endif /* GNC_ACCOUNTING_PERIOD_H */
129 
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
Many systems, including Microsoft Windows and BSD-derived Unixes like Darwin, are retaining the int-3...
Definition: gnc-date.h:93