The function counts the number of day of a period of one year, one quarter, and so on.
double get_date_period(DATEPERIOD period, int times = 1)
enum DATEPERIOD { DATEPERIOD_YEAR, DATEPERIOD_QUARTER, DATEPERIOD_MONTH, DATEPERIOD_WEEK, DATEPERIOD_DAY, DATEPERIOD_HOUR, DATEPERIOD_MINUTE, DATEPERIOD_SECOND, };
returns the period
EX1
void get_date_period_ex1() { double dd = get_date_period(DATEPERIOD_YEAR); out_double("Period of one year = ", dd); dd = get_date_period(DATEPERIOD_QUARTER); out_double("Period of one quarter = ", dd); dd = get_date_period(DATEPERIOD_WEEK, 2); out_double("Period of two weeks = ", dd); }
labutils.h