26 #include "dialog-bi-import-helper.h" 34 gboolean text2bool(
const gchar *text )
42 temp = g_strdup( text );
44 if ((g_ascii_strncasecmp( temp,
"y",1 ) == 0) || (g_ascii_strncasecmp( temp,
"t",1 ) == 0) ||
45 (g_ascii_strcasecmp( temp,
"1" ) == 0) || (g_ascii_strcasecmp( temp,
"x" ) == 0))
55 isDateValid(
char * date_string)
60 struct tm time_struct;
61 memset(&time_struct, 0,
sizeof(
struct tm));
63 tmp = strptime(date_string, date_format_string, &time_struct);
64 if (tmp == NULL)
return FALSE;
77 temp = g_strdup( text );
79 if ((strlen(temp) > 0) && (g_ascii_strcasecmp( temp,
"%" ) != 0))
86 GncDiscountHow text2disc_how(
const gchar *text )
88 GncDiscountHow how = GNC_DISC_PRETAX;
94 temp = g_strdup( text );
96 if (g_ascii_strcasecmp( temp,
"=" ) == 0)
97 how = GNC_DISC_SAMETIME;
98 else if (g_ascii_strcasecmp( temp,
">" ) == 0)
99 how = GNC_DISC_POSTTAX;
QofDateFormat qof_date_format_get(void)
The qof_date_format_get routine returns the date format that the date printing will use when printing...
const gchar * qof_date_format_get_string(QofDateFormat df)
This function returns a strftime formatting string for printing an all numeric date (e...
GncAmountType
How to interpret the amount.