|
|
| version 1.43, 2003/04/09 10:58:43 | version 1.45, 2003/04/11 15:00:04 |
|---|---|
| Line 177 static void _roll(Request& r, const Stri | Line 177 static void _roll(Request& r, const Stri |
| tmIn.tm_hour=24/2; | tmIn.tm_hour=24/2; |
| tmIn.tm_min=0; | tmIn.tm_min=0; |
| tmIn.tm_sec=0; | tmIn.tm_sec=0; |
| int saved_mon=tmIn.tm_mon; | int saved_mon=(tmIn.tm_mon+12*100)%12; // crossing year boundary backwards |
| t_changed_date=mktime/*normalizetime*/(&tmIn); | t_changed_date=mktime/*normalizetime*/(&tmIn); |
| if(t_changed_date<0) | if(t_changed_date<0) |
| throw Exception(0, | throw Exception(0, |
| Line 226 static void _roll(Request& r, const Stri | Line 226 static void _roll(Request& r, const Stri |
| } | } |
| static Table *fill_month_days(Request& r, | static Table *fill_month_days(Request& r, |
| const String& method_name, MethodParams *params, bool rus){ | const String& method_name, MethodParams *params, bool rus){ |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| Table *result=new(pool) Table(pool, *date_calendar_table_template); | Table::Action_options table_options; |
| Table *result=new(pool) Table(pool, *date_calendar_table_template, table_options); | |
| int year=params->as_int(1, "year must be int", r); | int year=params->as_int(1, "year must be int", r); |
| int month=max(1, min(params->as_int(2, "month must be int", r), 12)) -1; | int month=max(1, min(params->as_int(2, "month must be int", r), 12)) -1; |