gnm-datetime.h 818 Bytes
Newer Older
1 2 3
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifndef _GNM_DATETIME_H_
# define _GNM_DATETIME_H_
4 5

#include "gnumeric.h"
Morten Welinder's avatar
Morten Welinder committed
6
#include "numbers.h"
7 8 9 10 11 12 13 14 15 16 17 18 19
#include <goffice/utils/datetime.h>

G_BEGIN_DECLS


/* These are date-only, no time.  */
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,
			    GODateConventions const *date_conv);
gnm_float yearfrac (GDate const *from, GDate const *to, basis_t basis);

Morten Welinder's avatar
Morten Welinder committed
20 21 22
void gnm_date_add_days (GDate *d, int n);
void gnm_date_add_months (GDate *d, int n);
void gnm_date_add_years (GDate *d, int n);
23 24 25

G_END_DECLS

26
#endif /* _GNM_DATETIME_H_ */