static long_t asfreq_WtoB(long_t fromDate, char relation, asfreq_info *af_info) { struct date_info dinfo; if (dInfoCalc_SetFromAbsDate(&dinfo, asfreq_WtoD(fromDate, relation, af_info), GREGORIAN_CALENDAR)) return INT_ERR_CODE; if (relation == 'S') { return DtoB_WeekendToMonday(dinfo.absdate, dinfo.day_of_week); } else { return DtoB_WeekendToFriday(dinfo.absdate, dinfo.day_of_week); } }
static npy_int64 asfreq_WtoB(npy_int64 ordinal, char relation, asfreq_info *af_info) { struct date_info dinfo; if (dInfoCalc_SetFromAbsDate(&dinfo, asfreq_WtoD(ordinal, relation, af_info) + ORD_OFFSET, GREGORIAN_CALENDAR)) return INT_ERR_CODE; if (relation == 'S') { return DtoB_WeekendToMonday(dinfo.absdate, dinfo.day_of_week); } else { return DtoB_WeekendToFriday(dinfo.absdate, dinfo.day_of_week); } }
static long_t asfreq_WtoS(long_t fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoS(asfreq_WtoD(fromDate, relation, af_info), relation, &NULL_AF_INFO); }
static long_t asfreq_WtoW(long_t fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoW(asfreq_WtoD(fromDate, relation, af_info), relation, af_info); }
static long asfreq_WtoM(long fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoM(asfreq_WtoD(fromDate, 'E', af_info), relation, &NULL_AF_INFO); }
static long asfreq_WtoQ(long fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoQ(asfreq_WtoD(fromDate, 'E', af_info), relation, af_info); }
static npy_int64 asfreq_WtoS(npy_int64 ordinal, char relation, asfreq_info *af_info) { return asfreq_DtoS(asfreq_WtoD(ordinal, relation, af_info), relation, &NULL_AF_INFO); }
static npy_int64 asfreq_WtoW(npy_int64 ordinal, char relation, asfreq_info *af_info) { return asfreq_DtoW(asfreq_WtoD(ordinal, relation, af_info), relation, af_info); }
static int64_t asfreq_WtoT(int64_t fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoT(asfreq_WtoD(fromDate, relation, af_info), relation, &NULL_AF_INFO); }
static int64_t asfreq_WtoQ(int64_t fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoQ(asfreq_WtoD(fromDate, 'E', af_info), relation, af_info); }