Commit 74a4db03 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Don't g_barf on invalid dates.

2001-06-19  Morten Welinder  <terra@diku.dk>

	* src/number-match.c (compute_value): Don't g_barf on invalid
 	dates.
parent d74d0404
2001-06-19 Morten Welinder <terra@diku.dk>
* src/number-match.c (compute_value): Don't g_barf on invalid
dates.
2001-06-19 Almer S. Tigelaar <almer@gnome.org>
* src/item-cursor.c (item_cursor_tip_setstatus): New function.
......
2001-06-19 Morten Welinder <terra@diku.dk>
* src/number-match.c (compute_value): Don't g_barf on invalid
dates.
2001-06-19 Almer S. Tigelaar <almer@gnome.org>
* src/item-cursor.c (item_cursor_tip_setstatus): New function.
......
2001-06-19 Morten Welinder <terra@diku.dk>
* src/number-match.c (compute_value): Don't g_barf on invalid
dates.
2001-06-19 Almer S. Tigelaar <almer@gnome.org>
* src/item-cursor.c (item_cursor_tip_setstatus): New function.
......
2001-06-19 Morten Welinder <terra@diku.dk>
* src/number-match.c (compute_value): Don't g_barf on invalid
dates.
2001-06-19 Almer S. Tigelaar <almer@gnome.org>
* src/item-cursor.c (item_cursor_tip_setstatus): New function.
......
2001-06-19 Morten Welinder <terra@diku.dk>
* src/number-match.c (compute_value): Don't g_barf on invalid
dates.
2001-06-19 Almer S. Tigelaar <almer@gnome.org>
* src/item-cursor.c (item_cursor_tip_setstatus): New function.
......
......@@ -37,8 +37,8 @@ calc_N (gnum_float x)
* Requires.
* t > 0.
* stddev > 0.
* X != 0.
* S / X > 0.
* X > 0.
* S > 0.
*/
static gnum_float
calc_d1 (gnum_float X, gnum_float S, gnum_float stddev, gnum_float t, gnum_float r)
......
......@@ -930,16 +930,11 @@ compute_value (const char *s, const regmatch_t *mp,
if (day == -1)
day = tm->tm_mday;
if (day < 1 || day > 31)
return FALSE;
if (month < 1 || month > 12)
if (!g_date_valid_dmy (day, month, year))
return FALSE;
date = g_date_new_dmy (day, month, year);
number = datetime_g_to_serial (date);
g_date_free (date);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment