|
GnuCash 2.4.99
|
00001 /* 00002 * gnc-accounting-period.h -- 00003 * 00004 * Copyright (c) 2005 David Hampton <hampton@employees.org> 00005 * All rights reserved. 00006 * 00007 * GnuCash is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU Library General Public License as 00009 * published by the Free Software Foundation; either version 2 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * Gnucash is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Library General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, contact: 00019 * 00020 * Free Software Foundation Voice: +1-617-542-5942 00021 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 00022 * Boston, MA 02110-1301, USA gnu@gnu.org 00023 */ 00024 00044 #ifndef GNC_ACCOUNTING_PERIOD_H 00045 #define GNC_ACCOUNTING_PERIOD_H 00046 00047 #include <glib.h> 00048 #include <time.h> 00049 00053 typedef enum 00054 { 00055 GNC_ACCOUNTING_PERIOD_TODAY, 00056 GNC_ACCOUNTING_PERIOD_MONTH, 00057 GNC_ACCOUNTING_PERIOD_MONTH_PREV, 00058 GNC_ACCOUNTING_PERIOD_QUARTER, 00059 GNC_ACCOUNTING_PERIOD_QUARTER_PREV, 00060 GNC_ACCOUNTING_PERIOD_CYEAR, 00061 GNC_ACCOUNTING_PERIOD_CYEAR_PREV, 00062 GNC_ACCOUNTING_PERIOD_CYEAR_LAST, 00063 00064 GNC_ACCOUNTING_PERIOD_FYEAR = GNC_ACCOUNTING_PERIOD_CYEAR_LAST, 00065 GNC_ACCOUNTING_PERIOD_FYEAR_PREV, 00066 GNC_ACCOUNTING_PERIOD_FYEAR_LAST, 00067 GNC_ACCOUNTING_PERIOD_LAST = GNC_ACCOUNTING_PERIOD_FYEAR_LAST, 00068 } GncAccountingPeriod; 00069 00070 00093 GDate *gnc_accounting_period_start_gdate (GncAccountingPeriod which, 00094 const GDate *fy_end, 00095 const GDate *contains); 00096 00097 00117 time_t gnc_accounting_period_start_timet (GncAccountingPeriod which, 00118 const GDate *fy_end, 00119 const GDate *contains); 00120 00121 00141 GDate *gnc_accounting_period_end_gdate (GncAccountingPeriod which, 00142 const GDate *fy_end, 00143 const GDate *contains); 00144 00145 00165 time_t gnc_accounting_period_end_timet (GncAccountingPeriod which, 00166 const GDate *fy_end, 00167 const GDate *contains); 00168 00169 00170 /* Get the fiscal accounting period from the preferences and return 00171 the start and end times. */ 00172 time_t gnc_accounting_period_fiscal_start(void); 00173 time_t gnc_accounting_period_fiscal_end(void); 00174 00177 #endif /* GNC_ACCOUNTING_PERIOD_H */ 00178
1.7.4