Beispiel #1
0
static long_t asfreq_AtoB(long_t fromDate, char relation, asfreq_info *af_info) {

    struct date_info dinfo;
    if (dInfoCalc_SetFromAbsDate(&dinfo, asfreq_AtoD(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); }
}
Beispiel #2
0
static npy_int64 asfreq_AtoB(npy_int64 ordinal, char relation, asfreq_info *af_info) {

    struct date_info dinfo;
    if (dInfoCalc_SetFromAbsDate(&dinfo,
								 asfreq_AtoD(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); }
}
Beispiel #3
0
static long_t asfreq_AtoS(long_t fromDate, char relation, asfreq_info *af_info)
    { return asfreq_DtoS(asfreq_AtoD(fromDate, relation, af_info), relation, &NULL_AF_INFO); }
Beispiel #4
0
static long_t asfreq_AtoW(long_t fromDate, char relation, asfreq_info *af_info)
    { return asfreq_DtoW(asfreq_AtoD(fromDate, relation, af_info), relation, af_info); }
Beispiel #5
0
static npy_int64 asfreq_AtoS(npy_int64 ordinal, char relation, asfreq_info *af_info)
    { return asfreq_DtoS(asfreq_AtoD(ordinal, relation, af_info), relation, &NULL_AF_INFO); }
Beispiel #6
0
static npy_int64 asfreq_AtoW(npy_int64 ordinal, char relation, asfreq_info *af_info)
    { return asfreq_DtoW(asfreq_AtoD(ordinal, relation, af_info), relation, af_info); }
Beispiel #7
0
static int64_t asfreq_AtoT(int64_t fromDate, char relation, asfreq_info *af_info)
    { return asfreq_DtoT(asfreq_AtoD(fromDate, relation, af_info), relation, &NULL_AF_INFO); }
Beispiel #8
0
static int64_t asfreq_AtoM(int64_t fromDate, char relation, asfreq_info *af_info)
    { return asfreq_DtoM(asfreq_AtoD(fromDate, relation, af_info), relation, af_info); }