|
|
| version 1.47, 2003/10/30 12:46:23 | version 1.48, 2003/10/30 13:16:53 |
|---|---|
| Line 168 static void _sql_string(Request& r, Meth | Line 168 static void _sql_string(Request& r, Meth |
| r.write_assign_lang(String(buf, size)); | r.write_assign_lang(String(buf, size)); |
| } | } |
| static void _roll(Request& r, MethodParams& params) { | static void _roll(Request& r, MethodParams& params) { |
| VDate& vdate=GET_SELF(r, VDate); | VDate& vdate=GET_SELF(r, VDate); |
| Line 180 static void _roll(Request& r, MethodPara | Line 179 static void _roll(Request& r, MethodPara |
| if(what=="year") offset=&oyear; | if(what=="year") offset=&oyear; |
| else if(what=="month") offset=&omonth; | else if(what=="month") offset=&omonth; |
| else if(what=="day") offset=&oday; | else if(what=="day") offset=&oday; |
| else | else if(what=="TZ") { |
| const String& argument_tz=params.as_string(1, "'TZ' must be string"); | |
| vdate.set_tz(&argument_tz); | |
| return; | |
| } else | |
| throw Exception("parser.runtime", | throw Exception("parser.runtime", |
| &what, | &what, |
| "must be year|month|day"); | "must be year|month|day|TZ"); |
| *offset=params.as_int(1, "offset must be int", r); | *offset=params.as_int(1, "offset must be int", r); |