示例#1
0
文件: period.c 项目: Vistarino/pandas
static npy_int64 DtoB_WeekendToFriday(npy_int64 absdate, int day_of_week) {
    if (day_of_week > 4) {
        //change to friday before weekend
        absdate -= (day_of_week - 4);
    }
    return DtoB_weekday(absdate);
}
示例#2
0
文件: period.c 项目: Vistarino/pandas
static npy_int64 DtoB_WeekendToMonday(npy_int64 absdate, int day_of_week) {
    if (day_of_week > 4) {
        //change to Monday after weekend
        absdate += (7 - day_of_week);
    }
    return DtoB_weekday(absdate);
}
示例#3
0
文件: period.c 项目: takluyver/pandas
static long_t DtoB_WeekendToFriday(long_t absdate, int day_of_week) {
    if (day_of_week > 4) {
        //change to friday before weekend
        absdate -= (day_of_week - 4);
    }
    return DtoB_weekday(absdate);
}
示例#4
0
文件: period.c 项目: takluyver/pandas
static long_t DtoB_WeekendToMonday(long_t absdate, int day_of_week) {

    if (day_of_week > 4) {
        //change to Monday after weekend
        absdate += (7 - day_of_week);
    }
    return DtoB_weekday(absdate);
}
示例#5
0
文件: period.c 项目: takluyver/pandas
static long_t asfreq_DtoB_forConvert(long_t fromDate, char relation, asfreq_info *af_info) {

    struct date_info dinfo;
    if (dInfoCalc_SetFromAbsDate(&dinfo, fromDate, GREGORIAN_CALENDAR))
        return INT_ERR_CODE;

    if (dinfo.day_of_week > 4) {
        return INT_ERR_CODE;
    } else {
        return DtoB_weekday(fromDate);
    }
}