Example #1
0
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); }
}
Example #2
0
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); }
}
Example #3
0
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); }
Example #4
0
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); }
Example #5
0
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); }
Example #6
0
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); }
Example #7
0
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); }
Example #8
0
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); }