[gnumeric] DAYS: Fix swapped arguments.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] DAYS: Fix swapped arguments.
- Date: Wed, 24 Apr 2013 18:10:26 +0000 (UTC)
commit 8db248e202df821c5f180d400076bc5f7f3c9cab
Author: Morten Welinder <terra gnome org>
Date: Wed Apr 24 14:10:09 2013 -0400
DAYS: Fix swapped arguments.
NEWS | 1 +
plugins/fn-date/functions.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index f50366a..50123c5 100644
--- a/NEWS
+++ b/NEWS
@@ -69,6 +69,7 @@ Morten:
* Fix failed-read focus problem. [#625687]
* Fix critical. [#698680]
* Fix type problems with glib timers.
+ * Fix swapped arguments in DAYS. [#698772]
--------------------------------------------------------------------------
Gnumeric 1.12.1
diff --git a/plugins/fn-date/functions.c b/plugins/fn-date/functions.c
index 51a6ab1..842176d 100644
--- a/plugins/fn-date/functions.c
+++ b/plugins/fn-date/functions.c
@@ -1286,8 +1286,8 @@ gnumeric_yearfrac (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_days[] = {
{ GNM_FUNC_HELP_NAME, F_("DAYS:difference between dates in days") },
- { GNM_FUNC_HELP_ARG, F_("start_date:starting date serial value")},
{ GNM_FUNC_HELP_ARG, F_("end_date:ending date serial value")},
+ { GNM_FUNC_HELP_ARG, F_("start_date:starting date serial value")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("DAYS returns the positive or negative number of days from
@{start_date} to @{end_date}.") },
{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=DAYS(DATE(2003,2,3),DATE(2007,4,2))" },
@@ -1311,7 +1311,7 @@ gnumeric_days (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
go_date_serial_to_g (&d1, date1, conv);
go_date_serial_to_g (&d2, date2, conv);
- return value_new_int (g_date_days_between (&d1, &d2));
+ return value_new_int (g_date_days_between (&d2, &d1));
}
/***************************************************************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]