[gnumeric] Compilation: catch up with goffice.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] Compilation: catch up with goffice.
- Date: Sat, 22 Aug 2009 16:02:06 +0000 (UTC)
commit a93b05ca92236946952f06bfdd22435d57e5d6f2
Author: Morten Welinder <terra gnome org>
Date: Sat Aug 22 12:01:17 2009 -0400
Compilation: catch up with goffice.
plugins/excel/excel-xml-read.c | 2 +-
plugins/excel/xls-read-pivot.c | 2 +-
plugins/excel/xlsx-read.c | 2 +-
plugins/fn-date/functions.c | 72 ++++++++++++------------
plugins/fn-financial/functions.c | 100 +++++++++++++++++-----------------
plugins/gda/plugin-gda.c | 2 +-
plugins/openoffice/openoffice-read.c | 2 +-
plugins/paradox/paradox.c | 2 +-
plugins/xbase/boot.c | 2 +-
src/gnm-datetime.c | 22 ++++----
src/gnm-datetime.h | 4 +-
src/number-match.c | 2 +-
src/print-info.c | 2 +-
src/sheet-autofill.c | 2 +-
src/tools/fill-series.c | 32 ++++++------
src/wbc-gtk-actions.c | 2 +-
src/widgets/gnumeric-expr-entry.c | 2 +-
17 files changed, 127 insertions(+), 127 deletions(-)
---
diff --git a/plugins/excel/excel-xml-read.c b/plugins/excel/excel-xml-read.c
index 4a9478c..14a4b54 100644
--- a/plugins/excel/excel-xml-read.c
+++ b/plugins/excel/excel-xml-read.c
@@ -475,7 +475,7 @@ xl_xml_data_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
g_date_clear (&date, 1);
g_date_set_dmy (&date, d, mo, y);
if (g_date_valid (&date)) {
- unsigned d_serial = datetime_g_to_serial (&date,
+ unsigned d_serial = go_date_g_to_serial (&date,
workbook_date_conv (state->wb));
v = value_new_float (d_serial + h/24. + mi/(24.*60.) + s/(24.*60.*60.));
} else
diff --git a/plugins/excel/xls-read-pivot.c b/plugins/excel/xls-read-pivot.c
index 45fa22c..5186fd1 100644
--- a/plugins/excel/xls-read-pivot.c
+++ b/plugins/excel/xls-read-pivot.c
@@ -147,7 +147,7 @@ xls_read_pivot_cache_value (XLSReadPivot *s, BiffQuery *q)
g_date_set_dmy (&date, d, m, y);
if (g_date_valid (&date)) {
- unsigned d_serial = datetime_g_to_serial (&date,
+ unsigned d_serial = go_date_g_to_serial (&date,
workbook_date_conv (s->imp->wb));
double time_frac = h + ((double)mi / 60.) + ((double)se / 3600.);
GnmValue *res = value_new_float (d_serial + time_frac / 24.);
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 501d6c6..18872d3 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -546,7 +546,7 @@ attr_datetime (GsfXMLIn *xin, xmlChar const **attrs,
g_date_set_dmy (&date, d, m, y);
if (g_date_valid (&date)) {
XLSXReadState *state = (XLSXReadState *)xin->user_state;
- unsigned d_serial = datetime_g_to_serial (&date,
+ unsigned d_serial = go_date_g_to_serial (&date,
workbook_date_conv (state->wb));
if (n >= 6) {
double time_frac = h + ((double)mi / 60.) + ((double)s / 3600.);
diff --git a/plugins/fn-date/functions.c b/plugins/fn-date/functions.c
index 7880606..64cf398 100644
--- a/plugins/fn-date/functions.c
+++ b/plugins/fn-date/functions.c
@@ -121,7 +121,7 @@ gnumeric_date (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
g_date_get_year (&date) >= 11900)
goto error;
- return make_date (value_new_int (datetime_g_to_serial (&date, conv)));
+ return make_date (value_new_int (go_date_g_to_serial (&date, conv)));
error:
return value_new_error_NUM (ei->pos);
@@ -149,7 +149,7 @@ gnumeric_unix2date (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
if (gnm_abs (futime - utime) >= 1.0)
return value_new_error_VALUE (ei->pos);
- serial = datetime_timet_to_serial_raw (utime, DATE_CONV (ei->pos));
+ serial = go_date_timet_to_serial_raw (utime, DATE_CONV (ei->pos));
if (serial == G_MAXINT)
return value_new_error_VALUE (ei->pos);
@@ -173,7 +173,7 @@ gnumeric_date2unix (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
gnm_float fserial = value_get_as_float (argv [0]);
int serial = (int)fserial;
- time_t utime = datetime_serial_to_timet (serial, DATE_CONV (ei->pos));
+ time_t utime = go_date_serial_to_timet (serial, DATE_CONV (ei->pos));
/* Check for overflow. */
if (gnm_abs (fserial - serial) >= 1.0 || utime == (time_t)-1)
@@ -226,7 +226,7 @@ datedif_opt_ym (GDate *gdate1, GDate *gdate2)
g_assert (g_date_valid (gdate1));
g_assert (g_date_valid (gdate2));
- return datetime_g_months_between (gdate1, gdate2) % 12;
+ return go_date_g_months_between (gdate1, gdate2) % 12;
}
static int
@@ -240,7 +240,7 @@ datedif_opt_yd (GDate *gdate1, GDate *gdate2, int excel_compat)
day = g_date_get_day (gdate1);
gnm_date_add_years (gdate1,
- datetime_g_years_between (gdate1, gdate2));
+ go_date_g_years_between (gdate1, gdate2));
/* according to glib.h, feb 29 turns to feb 28 if necessary */
if (excel_compat) {
@@ -279,7 +279,7 @@ datedif_opt_md (GDate *gdate1, GDate *gdate2, gboolean excel_compat)
day = g_date_get_day (gdate1);
gnm_date_add_months (gdate1,
- datetime_g_months_between (gdate1, gdate2));
+ go_date_g_months_between (gdate1, gdate2));
/* according to glib.h, days>28 decrease if necessary */
if (excel_compat) {
@@ -322,15 +322,15 @@ gnumeric_datedif (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
if (!strcmp (opt, "d"))
return value_new_int (date2 - date1);
- datetime_serial_to_g (&d1, date1, conv);
- datetime_serial_to_g (&d2, date2, conv);
+ go_date_serial_to_g (&d1, date1, conv);
+ go_date_serial_to_g (&d2, date2, conv);
if (!g_date_valid (&d1) || !g_date_valid (&d2))
return value_new_error_VALUE (ei->pos);
if (!strcmp (opt, "m"))
- return value_new_int (datetime_g_months_between (&d1, &d2));
+ return value_new_int (go_date_g_months_between (&d1, &d2));
else if (!strcmp (opt, "y"))
- return value_new_int (datetime_g_years_between (&d1, &d2));
+ return value_new_int (go_date_g_years_between (&d1, &d2));
else if (!strcmp (opt, "ym"))
return value_new_int (datedif_opt_ym (&d1, &d2));
else if (!strcmp (opt, "yd"))
@@ -367,7 +367,7 @@ gnumeric_edate (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
if (months > INT_MAX / 2 || -months > INT_MAX / 2)
return value_new_error_NUM (ei->pos);
- datetime_serial_to_g (&date, (int)serial, conv);
+ go_date_serial_to_g (&date, (int)serial, conv);
gnm_date_add_months (&date, (int)months);
if (!g_date_valid (&date) ||
@@ -375,7 +375,7 @@ gnumeric_edate (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
g_date_get_year (&date) > 9999)
return value_new_error_NUM (ei->pos);
- return make_date (value_new_int (datetime_g_to_serial (&date, conv)));
+ return make_date (value_new_int (go_date_g_to_serial (&date, conv)));
}
/***************************************************************************/
@@ -392,7 +392,7 @@ static GnmFuncHelp const help_today[] = {
static GnmValue *
gnumeric_today (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
- return make_date (value_new_int (datetime_timet_to_serial (time (NULL), DATE_CONV (ei->pos))));
+ return make_date (value_new_int (go_date_timet_to_serial (time (NULL), DATE_CONV (ei->pos))));
}
/***************************************************************************/
@@ -409,7 +409,7 @@ static GnmFuncHelp const help_now[] = {
static GnmValue *
gnumeric_now (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
- return value_new_float (datetime_timet_to_serial_raw (time (NULL), DATE_CONV (ei->pos)));
+ return value_new_float (go_date_timet_to_serial_raw (time (NULL), DATE_CONV (ei->pos)));
}
/***************************************************************************/
@@ -659,7 +659,7 @@ static GnmFuncHelp const help_days360[] = {
static GnmValue *
gnumeric_days360 (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
- basis_t basis;
+ go_basis_t basis;
GDate date1, date2;
GODateConventions const *date_conv = DATE_CONV (ei->pos);
gnm_float serial1 = datetime_value_to_serial (argv[0], date_conv);
@@ -667,18 +667,18 @@ gnumeric_days360 (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
gnm_float method = argv[2] ? gnm_floor (value_get_as_float (argv[2])) : 0;
switch ((int)method) {
- case 0: basis = BASIS_MSRB_30_360; break;
+ case 0: basis = GO_BASIS_MSRB_30_360; break;
default:
- case 1: basis = BASIS_30E_360; break;
- case 2: basis = BASIS_MSRB_30_360_SYM; break;
+ case 1: basis = GO_BASIS_30E_360; break;
+ case 2: basis = GO_BASIS_MSRB_30_360_SYM; break;
}
- datetime_serial_to_g (&date1, serial1, date_conv);
- datetime_serial_to_g (&date2, serial2, date_conv);
+ go_date_serial_to_g (&date1, serial1, date_conv);
+ go_date_serial_to_g (&date2, serial2, date_conv);
if (!g_date_valid (&date1) || !g_date_valid (&date2))
return value_new_error_VALUE (ei->pos);
- return value_new_int (go_datetime_days_between_basis (&date1, &date2, basis));
+ return value_new_int (go_date_days_between_basis (&date1, &date2, basis));
}
/***************************************************************************/
@@ -718,7 +718,7 @@ gnumeric_eomonth (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
g_date_get_days_in_month (g_date_get_month (&date),
g_date_get_year (&date)));
- return make_date (value_new_int (datetime_g_to_serial (&date, conv)));
+ return make_date (value_new_int (go_date_g_to_serial (&date, conv)));
}
/***************************************************************************/
@@ -785,7 +785,7 @@ gnumeric_workday (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
hserial = (int)s;
if (j > 0 && hserial == holidays[j - 1])
continue; /* Dupe */
- datetime_serial_to_g (&hol, hserial, conv);
+ go_date_serial_to_g (&hol, hserial, conv);
if (!g_date_valid (&hol))
goto bad;
if (g_date_get_weekday (&hol) >= G_DATE_SATURDAY)
@@ -803,7 +803,7 @@ gnumeric_workday (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
idays = (int)days;
weekday = g_date_get_weekday (&date);
- serial = datetime_g_to_serial (&date, conv);
+ serial = go_date_g_to_serial (&date, conv);
if (idays > 0) {
int h = 0;
@@ -872,13 +872,13 @@ gnumeric_workday (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
g_free (holidays);
- datetime_serial_to_g (&date, serial, conv);
+ go_date_serial_to_g (&date, serial, conv);
if (!g_date_valid (&date) ||
g_date_get_year (&date) < 1900 ||
g_date_get_year (&date) > 9999)
return value_new_error_NUM (ei->pos);
- return make_date (value_new_int (datetime_g_to_serial (&date, conv)));
+ return make_date (value_new_int (go_date_g_to_serial (&date, conv)));
bad:
g_free (holidays);
@@ -910,7 +910,7 @@ get_serial_weekday (int serial, int *offset, GODateConventions const *conv)
if (serial <= 0)
return serial;
- datetime_serial_to_g (&date, serial, conv);
+ go_date_serial_to_g (&date, serial, conv);
if (g_date_valid (&date)) {
/* Jan 1 1900 was a monday so we won't go < 0 */
*offset = (int)g_date_get_weekday (&date) - 1;
@@ -944,7 +944,7 @@ cb_networkdays_holiday (GnmValueIter const *v_iter,
if (serial < cls->start_serial || cls->end_serial < serial)
return NULL;
- datetime_serial_to_g (&date, serial, conv);
+ go_date_serial_to_g (&date, serial, conv);
if (!g_date_valid (&date))
return value_new_error_NUM (v_iter->ep);
if (g_date_get_weekday (&date) < G_DATE_SATURDAY)
@@ -972,7 +972,7 @@ gnumeric_networkdays (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
end_serial = tmp;
}
- datetime_serial_to_g (&start_date, start_serial, DATE_CONV (ei->pos));
+ go_date_serial_to_g (&start_date, start_serial, DATE_CONV (ei->pos));
cls.start_serial = start_serial;
cls.end_serial = end_serial;
cls.res = 0;
@@ -1025,7 +1025,7 @@ gnumeric_isoweeknum (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
if (!g_date_valid (&date))
return value_new_error_VALUE (ei->pos);
- return value_new_int (datetime_weeknum (&date, WEEKNUM_METHOD_ISO));
+ return value_new_int (go_date_weeknum (&date, GO_WEEKNUM_METHOD_ISO));
}
/***************************************************************************/
@@ -1053,7 +1053,7 @@ gnumeric_isoyear (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
if (!g_date_valid (&date))
return value_new_error_VALUE (ei->pos);
- isoweeknum = datetime_weeknum (&date, WEEKNUM_METHOD_ISO);
+ isoweeknum = go_date_weeknum (&date, GO_WEEKNUM_METHOD_ISO);
year = g_date_get_year (&date);
month = g_date_get_month (&date);
if (isoweeknum >= 52 && month == G_DATE_JANUARY)
@@ -1086,16 +1086,16 @@ gnumeric_weeknum (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
GDate date;
gnm_float method = argv[1] ? gnm_floor (value_get_as_float (argv[1])) : 1;
- if (!(method == WEEKNUM_METHOD_SUNDAY ||
- method == WEEKNUM_METHOD_MONDAY ||
- method == WEEKNUM_METHOD_ISO))
+ if (!(method == GO_WEEKNUM_METHOD_SUNDAY ||
+ method == GO_WEEKNUM_METHOD_MONDAY ||
+ method == GO_WEEKNUM_METHOD_ISO))
return value_new_error_VALUE (ei->pos);
datetime_value_to_g (&date, argv[0], DATE_CONV (ei->pos));
if (!g_date_valid (&date))
return value_new_error_VALUE (ei->pos);
- return value_new_int (datetime_weeknum (&date, (int)method));
+ return value_new_int (go_date_weeknum (&date, (int)method));
}
/***************************************************************************/
@@ -1117,7 +1117,7 @@ gnumeric_yearfrac (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
GODateConventions const *conv = DATE_CONV (ei->pos);
GDate start_date, end_date;
- int basis = value_get_basis (argv[2], BASIS_MSRB_30_360);
+ int basis = value_get_basis (argv[2], GO_BASIS_MSRB_30_360);
if (basis < 0 || basis > 4 ||
!datetime_value_to_g (&start_date, argv[0], conv) ||
diff --git a/plugins/fn-financial/functions.c b/plugins/fn-financial/functions.c
index 029fd25..1290f79 100644
--- a/plugins/fn-financial/functions.c
+++ b/plugins/fn-financial/functions.c
@@ -245,7 +245,7 @@ days_monthly_basis (GnmValue const *issue_date,
*/
static gnm_float
coupnum (GDate const *settlement, GDate const *maturity,
- GnmCouponConvention const *conv)
+ GoCouponConvention const *conv)
{
int months;
GDate this_coupondate = *maturity;
@@ -275,25 +275,25 @@ coupnum (GDate const *settlement, GDate const *maturity,
static gnm_float
couppcd (GDate const *settlement, GDate const *maturity,
- GnmCouponConvention const *conv)
+ GoCouponConvention const *conv)
{
GDate date;
go_coup_cd (&date, settlement, maturity, conv->freq, conv->eom, FALSE);
- return datetime_g_to_serial (&date, conv->date_conv);
+ return go_date_g_to_serial (&date, conv->date_conv);
}
static gnm_float
coupncd (GDate const *settlement, GDate const *maturity,
- GnmCouponConvention const *conv)
+ GoCouponConvention const *conv)
{
GDate date;
go_coup_cd (&date, settlement, maturity, conv->freq, conv->eom, TRUE);
- return datetime_g_to_serial (&date, conv->date_conv);
+ return go_date_g_to_serial (&date, conv->date_conv);
}
static gnm_float
price (GDate *settlement, GDate *maturity, gnm_float rate, gnm_float yield,
- gnm_float redemption, GnmCouponConvention const *conv)
+ gnm_float redemption, GoCouponConvention const *conv)
{
gnm_float a, d, e, sum, den, basem1, exponent, first_term, last_term;
int n;
@@ -330,13 +330,13 @@ price (GDate *settlement, GDate *maturity, gnm_float rate, gnm_float yield,
static GnmValue *
func_coup (GnmFuncEvalInfo *ei, GnmValue const * const *argv,
gnm_float (coup_fn) (GDate const *settle, GDate const *mat,
- GnmCouponConvention const *conv))
+ GoCouponConvention const *conv))
{
GDate settlement, maturity;
- GnmCouponConvention conv;
+ GoCouponConvention conv;
conv.freq = value_get_freq (argv[2]);
- conv.basis = value_get_basis (argv[3], BASIS_MSRB_30_360);
+ conv.basis = value_get_basis (argv[3], GO_BASIS_MSRB_30_360);
conv.eom = argv[4] ? value_get_as_checked_bool (argv[4]) : TRUE;
conv.date_conv = workbook_date_conv (ei->pos->sheet->workbook);
@@ -391,7 +391,7 @@ gnumeric_accrint (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
rate = value_get_as_float (argv[3]);
par = value_get_as_float (argv[4]);
freq = value_get_freq (argv[5]);
- basis = value_get_basis (argv[6], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[6], GO_BASIS_MSRB_30_360);
if (rate <= 0. ||
par <= 0. ||
@@ -443,7 +443,7 @@ gnumeric_accrintm (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
rate = value_get_as_float (argv[2]);
par = argv[3] ? value_get_as_float (argv[3]) : 1000;
- basis = value_get_basis (argv[4], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[4], GO_BASIS_MSRB_30_360);
a = days_monthly_basis (argv[0], argv[1], basis, date_conv);
d = annual_year_basis (argv[0], basis, date_conv);
@@ -481,7 +481,7 @@ gnumeric_intrate (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
investment = value_get_as_float (argv[2]);
redemption = value_get_as_float (argv[3]);
- basis = value_get_basis (argv[4], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[4], GO_BASIS_MSRB_30_360);
a = days_monthly_basis (argv[0], argv[1], basis, date_conv);
d = annual_year_basis (argv[0], basis, date_conv);
@@ -519,7 +519,7 @@ gnumeric_received (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
investment = value_get_as_float (argv[2]);
discount = value_get_as_float (argv[3]);
- basis = value_get_basis (argv[4], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[4], GO_BASIS_MSRB_30_360);
a = days_monthly_basis (argv[0], argv[1], basis, date_conv);
d = annual_year_basis (argv[0], basis, date_conv);
@@ -559,7 +559,7 @@ gnumeric_pricedisc (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
discount = value_get_as_float (argv[2]);
redemption = value_get_as_float (argv[3]);
- basis = value_get_basis (argv[4], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[4], GO_BASIS_MSRB_30_360);
a = days_monthly_basis (argv[0], argv[1], basis, date_conv);
d = annual_year_basis (argv[0], basis, date_conv);
@@ -596,7 +596,7 @@ gnumeric_pricemat (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
discount = value_get_as_float (argv[3]);
yield = value_get_as_float (argv[4]);
- basis = value_get_basis (argv[5], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[5], GO_BASIS_MSRB_30_360);
dsm = days_monthly_basis (argv[0], argv[1], basis, date_conv);
dim = days_monthly_basis (argv[2], argv[1], basis, date_conv);
@@ -641,7 +641,7 @@ gnumeric_disc (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
par = value_get_as_float (argv[2]);
redemption = value_get_as_float (argv[3]);
- basis = value_get_basis (argv[4], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[4], GO_BASIS_MSRB_30_360);
b = annual_year_basis (argv[0], basis, date_conv);
dsm = days_monthly_basis (argv[0], argv[1], basis, date_conv);
@@ -1846,7 +1846,7 @@ gnumeric_duration (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
GDate nSettle, nMat;
gnm_float fCoup, fYield;
gnm_float fNumOfCoups;
- GnmCouponConvention conv;
+ GoCouponConvention conv;
conv.date_conv = workbook_date_conv (ei->pos->sheet->workbook);
conv.eom = TRUE;
@@ -1854,7 +1854,7 @@ gnumeric_duration (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
fCoup = value_get_as_float (argv[2]);
fYield = value_get_as_float (argv[3]);
conv.freq = value_get_freq (argv[4]);
- conv.basis = value_get_basis (argv[5], BASIS_MSRB_30_360);
+ conv.basis = value_get_basis (argv[5], GO_BASIS_MSRB_30_360);
if (!datetime_value_to_g (&nSettle, argv[0], conv.date_conv) ||
!datetime_value_to_g (&nMat, argv[1], conv.date_conv) ||
@@ -2085,7 +2085,7 @@ gnumeric_price (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
GDate settlement, maturity;
gnm_float rate, yield, redemption;
- GnmCouponConvention conv;
+ GoCouponConvention conv;
conv.date_conv = workbook_date_conv (ei->pos->sheet->workbook);
@@ -2094,7 +2094,7 @@ gnumeric_price (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
redemption = value_get_as_float (argv[4]);
conv.freq = value_get_freq (argv[5]);
conv.eom = TRUE;
- conv.basis = value_get_basis (argv[6], BASIS_MSRB_30_360);
+ conv.basis = value_get_basis (argv[6], GO_BASIS_MSRB_30_360);
if (!datetime_value_to_g (&settlement, argv[0], conv.date_conv) ||
!datetime_value_to_g (&maturity, argv[1], conv.date_conv))
@@ -2133,7 +2133,7 @@ static GnmFuncHelp const help_yield[] = {
typedef struct {
GDate settlement, maturity;
gnm_float rate, redemption, par;
- GnmCouponConvention conv;
+ GoCouponConvention conv;
} gnumeric_yield_t;
static GoalSeekStatus
@@ -2158,7 +2158,7 @@ gnumeric_yield (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
udata.par = value_get_as_float (argv[3]);
udata.redemption = value_get_as_float (argv[4]);
udata.conv.freq = value_get_freq (argv[5]);
- udata.conv.basis = value_get_basis (argv[6], BASIS_MSRB_30_360);
+ udata.conv.basis = value_get_basis (argv[6], GO_BASIS_MSRB_30_360);
udata.conv.eom = TRUE;
udata.conv.date_conv = workbook_date_conv (ei->pos->sheet->workbook);
@@ -2248,7 +2248,7 @@ gnumeric_yielddisc (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
fPrice = value_get_as_float (argv[2]);
fRedemp = value_get_as_float (argv[3]);
- basis = value_get_basis (argv[4], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[4], GO_BASIS_MSRB_30_360);
if (!is_valid_basis (basis) ||
!datetime_value_to_g (&settlement, argv[0], date_conv) ||
@@ -2293,7 +2293,7 @@ gnumeric_yieldmat (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
fRate = value_get_as_float (argv[3]);
fPrice = value_get_as_float (argv[4]);
- basis = value_get_basis (argv[5], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[5], GO_BASIS_MSRB_30_360);
if (!is_valid_basis (basis) ||
fRate < 0 ||
@@ -2327,7 +2327,7 @@ static GnmFuncHelp const help_oddfprice[] = {
static gnm_float
date_ratio (GDate const *d1, const GDate *d2, const GDate *d3,
- GnmCouponConvention const *conv)
+ GoCouponConvention const *conv)
{
GDate next_coupon, prev_coupon;
gnm_float res;
@@ -2342,10 +2342,10 @@ date_ratio (GDate const *d1, const GDate *d2, const GDate *d3,
return gnm_nan;
if (g_date_compare (&next_coupon, d2) >= 0)
- return go_datetime_days_between_basis (d1, d2, conv->basis) /
+ return go_date_days_between_basis (d1, d2, conv->basis) /
go_coupdays (&prev_coupon, &next_coupon, conv);
- res = go_datetime_days_between_basis (d1, &next_coupon, conv->basis) /
+ res = go_date_days_between_basis (d1, &next_coupon, conv->basis) /
go_coupdays (&prev_coupon, &next_coupon, conv);
while (1) {
prev_coupon = next_coupon;
@@ -2353,7 +2353,7 @@ date_ratio (GDate const *d1, const GDate *d2, const GDate *d3,
if (!g_date_valid (&next_coupon))
return gnm_nan;
if (g_date_compare (&next_coupon, d2) >= 0) {
- res += go_datetime_days_between_basis (&prev_coupon, d2, conv->basis) /
+ res += go_date_days_between_basis (&prev_coupon, d2, conv->basis) /
go_coupdays (&prev_coupon, &next_coupon, conv);
return res;
}
@@ -2365,12 +2365,12 @@ static gnm_float
calc_oddfprice (const GDate *settlement, const GDate *maturity,
const GDate *issue, const GDate *first_coupon,
gnm_float rate, gnm_float yield, gnm_float redemption,
- GnmCouponConvention const *conv)
+ GoCouponConvention const *conv)
{
- gnm_float a = go_datetime_days_between_basis (issue, settlement, conv->basis);
- gnm_float ds = go_datetime_days_between_basis (settlement, first_coupon, conv->basis);
- gnm_float df = go_datetime_days_between_basis (issue, first_coupon, conv->basis);
+ gnm_float a = go_date_days_between_basis (issue, settlement, conv->basis);
+ gnm_float ds = go_date_days_between_basis (settlement, first_coupon, conv->basis);
+ gnm_float df = go_date_days_between_basis (issue, first_coupon, conv->basis);
gnm_float e = go_coupdays (settlement, maturity, conv);
int n = (int)coupnum (settlement, maturity, conv);
gnm_float scale = 100.0 * rate / conv->freq;
@@ -2380,9 +2380,9 @@ calc_oddfprice (const GDate *settlement, const GDate *maturity,
if (ds > e) {
/* Odd-long corrections. */
switch (conv->basis) {
- case BASIS_MSRB_30_360:
- case BASIS_30E_360: {
- int cdays = go_datetime_days_between_basis (first_coupon, maturity, conv->basis);
+ case GO_BASIS_MSRB_30_360:
+ case GO_BASIS_30E_360: {
+ int cdays = go_date_days_between_basis (first_coupon, maturity, conv->basis);
n = 1 + (int)gnm_ceil (cdays / e);
break;
}
@@ -2394,7 +2394,7 @@ calc_oddfprice (const GDate *settlement, const GDate *maturity,
GDate prev_date = d;
gnm_date_add_months (&d, 12 / conv->freq);
if (g_date_compare (&d, maturity) >= 0) {
- n += (int)gnm_ceil (go_datetime_days_between_basis (&prev_date, maturity, conv->basis) /
+ n += (int)gnm_ceil (go_date_days_between_basis (&prev_date, maturity, conv->basis) /
go_coupdays (&prev_date, &d, conv))
+ 1;
break;
@@ -2422,7 +2422,7 @@ gnumeric_oddfprice (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
GDate settlement, maturity, issue, first_coupon;
gnm_float rate, yield, redemption;
- GnmCouponConvention conv;
+ GoCouponConvention conv;
rate = value_get_as_float (argv[4]);
yield = value_get_as_float (argv[5]);
@@ -2430,7 +2430,7 @@ gnumeric_oddfprice (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
conv.eom = TRUE;
conv.freq = value_get_freq (argv[7]);
- conv.basis = value_get_basis (argv[8], BASIS_MSRB_30_360);
+ conv.basis = value_get_basis (argv[8], GO_BASIS_MSRB_30_360);
conv.date_conv = workbook_date_conv (ei->pos->sheet->workbook);
if (!datetime_value_to_g (&settlement, argv[0], conv.date_conv) ||
@@ -2478,7 +2478,7 @@ static GnmFuncHelp const help_oddfyield[] = {
struct gnumeric_oddyield_f {
GDate settlement, maturity, issue, first_coupon;
gnm_float rate, price, redemption;
- GnmCouponConvention conv;
+ GoCouponConvention conv;
};
static GoalSeekStatus
@@ -2508,7 +2508,7 @@ gnumeric_oddfyield (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
udata.conv.eom = TRUE;
udata.conv.freq = value_get_freq (argv[7]);
- udata.conv.basis = value_get_basis (argv[8], BASIS_MSRB_30_360);
+ udata.conv.basis = value_get_basis (argv[8], GO_BASIS_MSRB_30_360);
udata.conv.date_conv = workbook_date_conv (ei->pos->sheet->workbook);
if (!datetime_value_to_g (&udata.settlement, argv[0], udata.conv.date_conv) ||
@@ -2574,7 +2574,7 @@ static gnm_float
calc_oddlprice (const GDate *settlement, const GDate *maturity,
const GDate *last_interest,
gnm_float rate, gnm_float yield, gnm_float redemption,
- GnmCouponConvention *conv)
+ GoCouponConvention *conv)
{
GDate d = *last_interest;
gnm_float x1, x2, x3;
@@ -2598,7 +2598,7 @@ gnumeric_oddlprice (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
GDate settlement, maturity, last_interest;
gnm_float rate, yield, redemption;
- GnmCouponConvention conv;
+ GoCouponConvention conv;
rate = value_get_as_float (argv[3]);
yield = value_get_as_float (argv[4]);
@@ -2606,7 +2606,7 @@ gnumeric_oddlprice (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
conv.eom = TRUE;
conv.freq = value_get_freq (argv[6]);
- conv.basis = value_get_basis (argv[7], BASIS_MSRB_30_360);
+ conv.basis = value_get_basis (argv[7], GO_BASIS_MSRB_30_360);
conv.date_conv = workbook_date_conv (ei->pos->sheet->workbook);
if (!datetime_value_to_g (&settlement, argv[0], conv.date_conv) ||
@@ -2653,7 +2653,7 @@ static gnm_float
calc_oddlyield (GDate const *settlement, GDate const *maturity,
GDate const *last_interest,
gnm_float rate, gnm_float price, gnm_float redemption,
- GnmCouponConvention const *conv)
+ GoCouponConvention const *conv)
{
GDate d = *last_interest;
gnm_float x1, x2, x3;
@@ -2676,7 +2676,7 @@ gnumeric_oddlyield (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
GDate settlement, maturity, last_interest;
gnm_float rate, price, redemption;
- GnmCouponConvention conv;
+ GoCouponConvention conv;
rate = value_get_as_float (argv[3]);
price = value_get_as_float (argv[4]);
@@ -2684,7 +2684,7 @@ gnumeric_oddlyield (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
conv.eom = TRUE;
conv.freq = value_get_freq (argv[6]);
- conv.basis = value_get_basis (argv[7], BASIS_MSRB_30_360);
+ conv.basis = value_get_basis (argv[7], GO_BASIS_MSRB_30_360);
conv.date_conv = workbook_date_conv (ei->pos->sheet->workbook);
if (!datetime_value_to_g (&settlement, argv[0], conv.date_conv) ||
@@ -2743,7 +2743,7 @@ gnumeric_amordegrc (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
fRestVal = value_get_as_float (argv[3]);
nPer = value_get_as_int (argv[4]);
fRate = value_get_as_float (argv[5]);
- basis = value_get_basis (argv[6], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[6], GO_BASIS_MSRB_30_360);
if (!is_valid_basis (basis) ||
fRate < 0 ||
@@ -2789,7 +2789,7 @@ gnumeric_amorlinc (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
fRestVal = value_get_as_float (argv[3]);
nPer = value_get_as_int (argv[4]);
fRate = value_get_as_float (argv[5]);
- basis = value_get_basis (argv[6], BASIS_MSRB_30_360);
+ basis = value_get_basis (argv[6], GO_BASIS_MSRB_30_360);
if (!is_valid_basis (basis) ||
fRate < 0 ||
@@ -3060,7 +3060,7 @@ gnumeric_mduration (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
GDate nSettle, nMat;
gnm_float fCoup, fYield;
gnm_float fNumOfCoups;
- GnmCouponConvention conv;
+ GoCouponConvention conv;
conv.date_conv = workbook_date_conv (ei->pos->sheet->workbook);
conv.eom = TRUE;
@@ -3068,7 +3068,7 @@ gnumeric_mduration (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
fCoup = value_get_as_float (argv[2]);
fYield = value_get_as_float (argv[3]);
conv.freq = value_get_freq (argv[4]);
- conv.basis = value_get_basis (argv[5], BASIS_MSRB_30_360);
+ conv.basis = value_get_basis (argv[5], GO_BASIS_MSRB_30_360);
conv.eom = FALSE;
if (!is_valid_basis (conv.basis) ||
diff --git a/plugins/gda/plugin-gda.c b/plugins/gda/plugin-gda.c
index f333c1a..11cd4a8 100644
--- a/plugins/gda/plugin-gda.c
+++ b/plugins/gda/plugin-gda.c
@@ -62,7 +62,7 @@ gnm_value_new_from_gda (GValue const *gval,
if (t == GDA_TYPE_USHORT)
return value_new_int (gda_value_get_ushort (gval));
if (t == G_TYPE_DATE) {
- res = value_new_int (datetime_g_to_serial (
+ res = value_new_int (go_date_g_to_serial (
(GDate const *) g_value_get_boxed (gval), date_conv));
value_set_fmt (res, go_format_default_date ());
return res;
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index af801b1..0e22920 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -1215,7 +1215,7 @@ oo_cell_start (GsfXMLIn *xin, xmlChar const **attrs)
GDate date;
g_date_set_dmy (&date, d, m, y);
if (g_date_valid (&date)) {
- unsigned d_serial = datetime_g_to_serial (&date,
+ unsigned d_serial = go_date_g_to_serial (&date,
workbook_date_conv (state->pos.wb));
if (n >= 6) {
double time_frac = h + ((double)mi / 60.) + ((double)s / 3600.);
diff --git a/plugins/paradox/paradox.c b/plugins/paradox/paradox.c
index 5fd2608..86ebe6d 100644
--- a/plugins/paradox/paradox.c
+++ b/plugins/paradox/paradox.c
@@ -187,7 +187,7 @@ paradox_file_open (GOFileOpener const *fo, GOIOContext *io_context,
if (0 < PX_get_data_long (pxdoc, &data[offset], pxf->px_flen, &value)) {
PX_SdnToGregorian (value+1721425, &year, &month, &day);
date = g_date_new_dmy (day, month, year);
- val = value_new_int (datetime_g_to_serial (date, NULL));
+ val = value_new_int (go_date_g_to_serial (date, NULL));
value_set_fmt (val, go_format_default_date ());
g_date_free (date);
}
diff --git a/plugins/xbase/boot.c b/plugins/xbase/boot.c
index ddc0b14..4eb474f 100644
--- a/plugins/xbase/boot.c
+++ b/plugins/xbase/boot.c
@@ -93,7 +93,7 @@ xbase_field_as_value (gchar *content, XBfield *field, XBfile *file)
g_date_valid_dmy (day, month, year)) {
GDate *date = g_date_new_dmy (day, month, year);
/* Use default date convention */
- val = value_new_int (datetime_g_to_serial (date, NULL));
+ val = value_new_int (go_date_g_to_serial (date, NULL));
g_date_free (date);
} else
val = value_new_string (s);
diff --git a/src/gnm-datetime.c b/src/gnm-datetime.c
index a341eb6..28ddc07 100644
--- a/src/gnm-datetime.c
+++ b/src/gnm-datetime.c
@@ -89,7 +89,7 @@ datetime_value_to_serial (GnmValue const *v, GODateConventions const *conv)
double serial = datetime_value_to_serial_raw (v, conv);
if (serial >= G_MAXINT || serial < G_MININT)
return G_MAXINT;
- return datetime_serial_raw_to_serial (serial);
+ return go_date_serial_raw_to_serial (serial);
}
/* ------------------------------------------------------------------------- */
@@ -102,7 +102,7 @@ datetime_value_to_g (GDate *res, GnmValue const *v, GODateConventions const *con
g_date_clear (res, 1);
return FALSE;
}
- datetime_serial_to_g (res, serial, conv);
+ go_date_serial_to_g (res, serial, conv);
return g_date_valid (res);
}
@@ -125,24 +125,24 @@ datetime_value_to_g (GDate *res, GnmValue const *v, GODateConventions const *con
* year).
*/
int
-annual_year_basis (GnmValue const *value_date, basis_t basis,
+annual_year_basis (GnmValue const *value_date, go_basis_t basis,
GODateConventions const *date_conv)
{
GDate date;
switch (basis) {
- case BASIS_MSRB_30_360:
+ case GO_BASIS_MSRB_30_360:
return 360;
- case BASIS_ACT_ACT:
+ case GO_BASIS_ACT_ACT:
if (!datetime_value_to_g (&date, value_date, date_conv))
return -1;
return g_date_is_leap_year (g_date_get_year (&date))
? 366 : 365;
- case BASIS_ACT_360:
+ case GO_BASIS_ACT_360:
return 360;
- case BASIS_ACT_365:
+ case GO_BASIS_ACT_365:
return 365;
- case BASIS_30E_360:
+ case GO_BASIS_30E_360:
return 360;
default:
return -1;
@@ -150,7 +150,7 @@ annual_year_basis (GnmValue const *value_date, basis_t basis,
}
gnm_float
-yearfrac (GDate const *from, GDate const *to, basis_t basis)
+yearfrac (GDate const *from, GDate const *to, go_basis_t basis)
{
int days;
gnm_float peryear;
@@ -158,7 +158,7 @@ yearfrac (GDate const *from, GDate const *to, basis_t basis)
if (!g_date_valid (from) || !g_date_valid (to))
return gnm_nan;
- days = go_datetime_days_between_basis (from, to, basis);
+ days = go_date_days_between_basis (from, to, basis);
if (days < 0) {
const GDate *tmp;
@@ -167,7 +167,7 @@ yearfrac (GDate const *from, GDate const *to, basis_t basis)
}
switch (basis) {
- case BASIS_ACT_ACT: {
+ case GO_BASIS_ACT_ACT: {
int y1 = g_date_get_year (from);
int y2 = g_date_get_year (to);
GDate d1, d2;
diff --git a/src/gnm-datetime.h b/src/gnm-datetime.h
index 5e54c04..bdba91f 100644
--- a/src/gnm-datetime.h
+++ b/src/gnm-datetime.h
@@ -17,9 +17,9 @@ int datetime_value_to_seconds (GnmValue const *v, GODateConventions const *
gboolean datetime_value_to_g (GDate *res, GnmValue const *v, GODateConventions const *conv);
int datetime_value_to_serial (GnmValue const *v, GODateConventions const *conv);
-int annual_year_basis (GnmValue const *value_date, basis_t basis,
+int annual_year_basis (GnmValue const *value_date, go_basis_t basis,
GODateConventions const *date_conv);
-gnm_float yearfrac (GDate const *from, GDate const *to, basis_t basis);
+gnm_float yearfrac (GDate const *from, GDate const *to, go_basis_t basis);
void gnm_date_add_days (GDate *d, int n);
void gnm_date_add_months (GDate *d, int n);
diff --git a/src/number-match.c b/src/number-match.c
index f68cc14..dd26f3a 100644
--- a/src/number-match.c
+++ b/src/number-match.c
@@ -735,7 +735,7 @@ format_match_datetime (char const *text,
g_date_set_dmy (&date, day, month, year);
if (!g_date_valid (&date))
goto out;
- date_val = datetime_g_to_serial (&date, date_conv);
+ date_val = go_date_g_to_serial (&date, date_conv);
SKIP_SPACES (text);
diff --git a/src/print-info.c b/src/print-info.c
index 9548d6a..eace539 100644
--- a/src/print-info.c
+++ b/src/print-info.c
@@ -680,7 +680,7 @@ hf_render_info_new (void)
hfi = g_new0 (HFRenderInfo, 1);
hfi->date_conv = go_date_conv_from_str ("Lotus:1900");
hfi->date_time = value_new_float
- (datetime_timet_to_serial_raw (time (NULL), hfi->date_conv));
+ (go_date_timet_to_serial_raw (time (NULL), hfi->date_conv));
/* It doesn't appear like the end is accessed. */
range_init (&hfi->page_area, 0, 0, G_MAXINT / 2, G_MAXINT / 2);
hfi->top_repeating.col = 0;
diff --git a/src/sheet-autofill.c b/src/sheet-autofill.c
index 3807e2d..aa17a7f 100644
--- a/src/sheet-autofill.c
+++ b/src/sheet-autofill.c
@@ -598,7 +598,7 @@ afm_compute (AutoFillerMonth *afm, int n)
g_date_set_day (&d, g_date_get_days_in_month (month, year));
}
- v = value_new_int (datetime_g_to_serial (&d, afm->dateconv));
+ v = value_new_int (go_date_g_to_serial (&d, afm->dateconv));
if (afm->format)
value_set_fmt (v, afm->format);
return v;
diff --git a/src/tools/fill-series.c b/src/tools/fill-series.c
index cf89178..84cc74d 100644
--- a/src/tools/fill-series.c
+++ b/src/tools/fill-series.c
@@ -59,14 +59,14 @@ do_row_filling_wday (data_analysis_output_t *dao, fill_series_t *info)
int days = (steps / 5) * 7 + steps % 5;
GDateWeekday wd;
- datetime_serial_to_g (&date, start, conv);
+ go_date_serial_to_g (&date, start, conv);
wd = g_date_get_weekday (&date);
if (wd + (steps % 5) > G_DATE_FRIDAY)
days += 2;
gnm_date_add_days (&date, days);
dao_set_cell_float (dao, i, 0,
- datetime_g_to_serial (&date, conv));
+ go_date_g_to_serial (&date, conv));
}
}
@@ -86,14 +86,14 @@ do_column_filling_wday (data_analysis_output_t *dao, fill_series_t *info)
int days = (steps / 5) * 7 + steps % 5;
GDateWeekday wd;
- datetime_serial_to_g (&date, start, conv);
+ go_date_serial_to_g (&date, start, conv);
wd = g_date_get_weekday (&date);
if (wd + (steps % 5) > G_DATE_FRIDAY)
days += 2;
gnm_date_add_days (&date, days);
dao_set_cell_float (dao, 0,i,
- datetime_g_to_serial (&date, conv));
+ go_date_g_to_serial (&date, conv));
}
@@ -110,11 +110,11 @@ do_row_filling_month (data_analysis_output_t *dao, fill_series_t *info)
for (i = 0; i < info->n; i++) {
- datetime_serial_to_g (&date, start, conv);
+ go_date_serial_to_g (&date, start, conv);
gnm_date_add_months (&date, i * info->step_value);
dao_set_cell_float (dao, i, 0,
- datetime_g_to_serial (&date, conv));
+ go_date_g_to_serial (&date, conv));
}
}
@@ -129,11 +129,11 @@ do_column_filling_month (data_analysis_output_t *dao, fill_series_t *info)
for (i = 0; i < info->n; i++) {
- datetime_serial_to_g (&date, start, conv);
+ go_date_serial_to_g (&date, start, conv);
gnm_date_add_months (&date, i * info->step_value);
dao_set_cell_float (dao, 0, i,
- datetime_g_to_serial (&date, conv));
+ go_date_g_to_serial (&date, conv));
}
}
@@ -148,11 +148,11 @@ do_row_filling_year (data_analysis_output_t *dao, fill_series_t *info)
for (i = 0; i < info->n; i++) {
- datetime_serial_to_g (&date, start, conv);
+ go_date_serial_to_g (&date, start, conv);
gnm_date_add_years (&date, i * info->step_value);
dao_set_cell_float (dao, i, 0,
- datetime_g_to_serial (&date, conv));
+ go_date_g_to_serial (&date, conv));
}
}
@@ -167,11 +167,11 @@ do_column_filling_year (data_analysis_output_t *dao, fill_series_t *info)
for (i = 0; i < info->n; i++) {
- datetime_serial_to_g (&date, start, conv);
+ go_date_serial_to_g (&date, start, conv);
gnm_date_add_years (&date, i * info->step_value);
dao_set_cell_float (dao, 0, i,
- datetime_g_to_serial (&date, conv));
+ go_date_g_to_serial (&date, conv));
}
}
@@ -246,14 +246,14 @@ fill_series_adjust_variables (data_analysis_output_t *dao, fill_series_t *info)
workbook_date_conv (dao->sheet->workbook);
if (info->step_value < 0) {
- datetime_serial_to_g (&from_date,
+ go_date_serial_to_g (&from_date,
info->stop_value, conv);
- datetime_serial_to_g (&to_date,
+ go_date_serial_to_g (&to_date,
info->start_value, conv);
} else {
- datetime_serial_to_g (&from_date,
+ go_date_serial_to_g (&from_date,
info->start_value, conv);
- datetime_serial_to_g (&to_date,
+ go_date_serial_to_g (&to_date,
info->stop_value, conv);
}
switch (info->date_unit) {
diff --git a/src/wbc-gtk-actions.c b/src/wbc-gtk-actions.c
index 1d74247..8a04865 100644
--- a/src/wbc-gtk-actions.c
+++ b/src/wbc-gtk-actions.c
@@ -714,7 +714,7 @@ insert_date_time_common (WBCGtk *wbcg, gboolean do_date, gboolean do_time)
GODateConventions const *date_conv =
workbook_date_conv (sheet->workbook);
GnmValue *v = value_new_float
- (datetime_timet_to_serial_raw (time (NULL), date_conv));
+ (go_date_timet_to_serial_raw (time (NULL), date_conv));
char *txt;
char *dtxt = NULL;
char *ttxt = NULL;
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 9220b43..e2af9bf 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -338,7 +338,7 @@ cb_calendar_changed (GOCalendarButton *calb, GnmExprEntry *gee)
if (!go_calendar_button_get_date (calb, &date))
return;
- serial = datetime_g_to_serial (&date, date_conv);
+ serial = go_date_g_to_serial (&date, date_conv);
gee_set_value_double (GOG_DATA_EDITOR (gee), serial, date_conv);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]