static npy_int64 DtoB_WeekendToFriday(npy_int64 absdate, int day_of_week) { if (day_of_week > 4) { //change to friday before weekend absdate -= (day_of_week - 4); } return DtoB_weekday(absdate); }
static npy_int64 DtoB_WeekendToMonday(npy_int64 absdate, int day_of_week) { if (day_of_week > 4) { //change to Monday after weekend absdate += (7 - day_of_week); } return DtoB_weekday(absdate); }
static long_t DtoB_WeekendToFriday(long_t absdate, int day_of_week) { if (day_of_week > 4) { //change to friday before weekend absdate -= (day_of_week - 4); } return DtoB_weekday(absdate); }
static long_t DtoB_WeekendToMonday(long_t absdate, int day_of_week) { if (day_of_week > 4) { //change to Monday after weekend absdate += (7 - day_of_week); } return DtoB_weekday(absdate); }
static long_t asfreq_DtoB_forConvert(long_t fromDate, char relation, asfreq_info *af_info) { struct date_info dinfo; if (dInfoCalc_SetFromAbsDate(&dinfo, fromDate, GREGORIAN_CALENDAR)) return INT_ERR_CODE; if (dinfo.day_of_week > 4) { return INT_ERR_CODE; } else { return DtoB_weekday(fromDate); } }