Beispiel #1
0
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); }
}
Beispiel #2
0
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);
	}
}
Beispiel #3
0
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); }
Beispiel #4
0
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); }
Beispiel #5
0
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); }
Beispiel #6
0
static long asfreq_WtoQ(long fromDate, char relation, asfreq_info *af_info) {
    return asfreq_DtoQ(asfreq_WtoD(fromDate, 'E', af_info), relation, af_info); }
Beispiel #7
0
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); }
Beispiel #8
0
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); }
Beispiel #9
0
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); }
Beispiel #10
0
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); }