GnuCash  5.6-150-g038405b370+
gnc-date-format.h
1 /*
2  * gnc-date-format.c -- Date formator widget
3  *
4  * Copyright (C) 2003 Derek Atkins <derek@ihtfp.com>
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 /*
25  @NOTATION@
26  */
27 
28 
29 #ifndef GNC_DATE_FORMAT_H
30 #define GNC_DATE_FORMAT_H
31 
32 #include "qof.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #define GNC_TYPE_DATE_FORMAT (gnc_date_format_get_type ())
39 G_DECLARE_FINAL_TYPE (GNCDateFormat, gnc_date_format, GNC, DATE_FORMAT, GtkBox)
40 
41 GtkWidget *gnc_date_format_new (void);
42 GtkWidget *gnc_date_format_new_without_label (void);
43 GtkWidget *gnc_date_format_new_with_label (const char *label);
44 
45 void gnc_date_format_set_format (GNCDateFormat *gdf, QofDateFormat format);
46 QofDateFormat gnc_date_format_get_format (GNCDateFormat *gdf);
47 
48 void gnc_date_format_set_months (GNCDateFormat *gdf,
49  GNCDateMonthFormat months);
50 GNCDateMonthFormat gnc_date_format_get_months (GNCDateFormat *gdf);
51 
52 void gnc_date_format_set_years (GNCDateFormat *gdf,
53  gboolean include_century);
54 gboolean gnc_date_format_get_years (GNCDateFormat *gdf);
55 
56 void gnc_date_format_set_custom (GNCDateFormat *gdf, const char *format);
57 const char* gnc_date_format_get_custom (GNCDateFormat *gdf);
58 
59 void gnc_date_format_refresh (GNCDateFormat *gdf);
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif
GNCDateMonthFormat
This is how to format the month, as a number, an abbreviated string, or the full name.
Definition: gnc-date.h:148
QofDateFormat
Enum for determining a date format.
Definition: gnc-date.h:122