static long_t asfreq_QtoB(long_t fromDate, char relation, asfreq_info *af_info) { struct date_info dinfo; if (dInfoCalc_SetFromAbsDate(&dinfo, asfreq_QtoD(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_QtoB(npy_int64 ordinal, char relation, asfreq_info *af_info) { struct date_info dinfo; if (dInfoCalc_SetFromAbsDate(&dinfo, asfreq_QtoD(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_QtoS(long_t fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoS(asfreq_QtoD(fromDate, relation, af_info), relation, &NULL_AF_INFO); }
static long_t asfreq_QtoW(long_t fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoW(asfreq_QtoD(fromDate, relation, af_info), relation, af_info); }
static npy_int64 asfreq_QtoS(npy_int64 ordinal, char relation, asfreq_info *af_info) { return asfreq_DtoS(asfreq_QtoD(ordinal, relation, af_info), relation, &NULL_AF_INFO); }
static npy_int64 asfreq_QtoW(npy_int64 ordinal, char relation, asfreq_info *af_info) { return asfreq_DtoW(asfreq_QtoD(ordinal, relation, af_info), relation, af_info); }
static int64_t asfreq_QtoT(int64_t fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoT(asfreq_QtoD(fromDate, relation, af_info), relation, &NULL_AF_INFO); }
static int64_t asfreq_QtoA(int64_t fromDate, char relation, asfreq_info *af_info) { return asfreq_DtoA(asfreq_QtoD(fromDate, relation, af_info), relation, af_info); }