"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/src/calendar.c" between
gretl-2020a.tar.xz and gretl-2020b.tar.xz

About: gretl (Gnu Regression, Econometrics and Time-series Library) is a cross-platform statistical package mainly for econometric analysis.

calendar.c  (gretl-2020a.tar.xz):calendar.c  (gretl-2020b.tar.xz)
skipping to change at line 291 skipping to change at line 291
} }
if (*err) { if (*err) {
return NADBL; return NADBL;
} else { } else {
return 10000*y + 100*m + d; return 10000*y + 100*m + d;
} }
} }
/** /**
* epoch_day_from_ymd_basic:
* @ymd: number that is supposed to represent YYYYMMDD.
*
* Returns: the epoch day number corresponding to @ymd, interpreted
* as YYYYMMDD (ISO 8601 "basic") if possible, or 0 on error.
*/
guint32 epoch_day_from_ymd_basic (double ymd)
{
gchar tmp[9];
int y, m, d, n;
n = g_snprintf(tmp, 9, "%.0f", ymd);
if (n != 8) {
return 0;
}
y = floor(ymd / 10000);
ymd -= y * 10000;
m = floor(ymd / 100);
d = ymd - m * 100;
return epoch_day_from_ymd(y, m, d);
}
/**
* weekday_from_epoch_day: * weekday_from_epoch_day:
* @ed: epoch day (ed >= 1). * @ed: epoch day (ed >= 1).
* *
* Returns: the weekday (Sunday = 0) corrsponding to @ed, * Returns: the weekday (Sunday = 0) corrsponding to @ed,
* or -1 on error. * or -1 on error.
*/ */
int weekday_from_epoch_day (guint32 ed) int weekday_from_epoch_day (guint32 ed)
{ {
GDate date; GDate date;
 End of changes. 1 change blocks. 
0 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)