| GOffice Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
GODateConventions; GoCouponConvention; enum GOBasisType; void go_coup_cd (GDate *res,GDate const *settle,GDate const *mat,int freq,gboolean eom,gboolean next); double go_coupdaybs (GDate const *settlement,GDate const *maturity,GoCouponConvention const *conv); double go_coupdays (GDate const *settlement,GDate const *maturity,GoCouponConvention const *conv); double go_coupdaysnc (GDate const *settlement,GDate const *maturity,GoCouponConvention const *conv); gboolean go_date_conv_equal (const GODateConventions *a,const GODateConventions *b); const GODateConventions * go_date_conv_from_str (const char *s); double go_date_conv_translate (double f,const GODateConventions *src,const GODateConventions *dst); int go_date_convention_base (GODateConventions const *conv); gint32 go_date_days_between_basis (GDate const *from,GDate const *to,GOBasisType basis); int go_date_g_months_between (GDate const *date1,GDate const *date2); int go_date_g_to_serial (GDate const *date,GODateConventions const *conv); int go_date_g_years_between (GDate const *date1,GDate const *date2); char * go_date_month_name (GDateMonth m,gboolean abbrev); int go_date_serial_raw_to_seconds (double raw); int go_date_serial_raw_to_serial (double raw); void go_date_serial_to_g (GDate *res,int serial,GODateConventions const *conv); time_t go_date_serial_to_timet (int serial,GODateConventions const *conv); int go_date_timet_to_seconds (time_t t); int go_date_timet_to_serial (time_t t,GODateConventions const *conv); double go_date_timet_to_serial_raw (time_t t,GODateConventions const *conv); char * go_date_weekday_name (GDateWeekday wd,gboolean abbrev); int go_date_weeknum (GDate const *date,int method);
typedef struct {
gboolean use_1904; /* Use MacOffice 1904 based date convention,
* Rather than the Win32 style 1900 */
} GODateConventions;
typedef struct {
int freq;
GOBasisType basis;
gboolean eom;
GODateConventions const *date_conv;
} GoCouponConvention;
| frequency. | |
GOBasisType |
GOBasisType |
| end of month. | |
GODateConventions const * |
GODateConventions |
typedef enum {
/* see doc/fn-financial-basis.txt for details */
GO_BASIS_MSRB_30_360 = 0,
GO_BASIS_ACT_ACT = 1,
GO_BASIS_ACT_360 = 2,
GO_BASIS_ACT_365 = 3,
GO_BASIS_30E_360 = 4,
GO_BASIS_30Ep_360 = 5,
GO_BASIS_MSRB_30_360_SYM = 6 /* Gnumeric extension. */
} GOBasisType;
void go_coup_cd (GDate *res,GDate const *settle,GDate const *mat,int freq,gboolean eom,gboolean next);
double go_coupdaybs (GDate const *settlement,GDate const *maturity,GoCouponConvention const *conv);
|
GDate |
|
GDate |
|
GoCouponConvention |
Returns : |
the number of days from the beginning of the coupon period to the settlement date. |
double go_coupdays (GDate const *settlement,GDate const *maturity,GoCouponConvention const *conv);
|
GDate |
|
GDate |
|
GoCouponConvention |
Returns : |
the number of days in the coupon period of the settlement date. Currently, returns negative numbers if the branch is not implemented. |
double go_coupdaysnc (GDate const *settlement,GDate const *maturity,GoCouponConvention const *conv);
|
GoCouponConvention |
Returns : |
the number of days from the settlement date to the next coupon date. |
gboolean go_date_conv_equal (const GODateConventions *a,const GODateConventions *b);
double go_date_conv_translate (double f,const GODateConventions *src,const GODateConventions *dst);
gint32 go_date_days_between_basis (GDate const *from,GDate const *to,GOBasisType basis);
void go_date_serial_to_g (GDate *res,int serial,GODateConventions const *conv);
time_t go_date_serial_to_timet (int serial,GODateConventions const *conv);
double go_date_timet_to_serial_raw (time_t t,GODateConventions const *conv);