--- parser3/src/classes/op.C 2023/09/26 20:49:06 1.262 +++ parser3/src/classes/op.C 2024/11/04 03:53:25 1.265 @@ -1,7 +1,7 @@ /** @file Parser: parser @b operators. - Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) Authors: Konstantin Morshnev , Alexandr Petrosian */ @@ -18,7 +18,7 @@ #include "pa_vclass.h" #include "pa_charset.h" -volatile const char * IDENT_OP_C="$Id: op.C,v 1.262 2023/09/26 20:49:06 moko Exp $"; +volatile const char * IDENT_OP_C="$Id: op.C,v 1.265 2024/11/04 03:53:25 moko Exp $"; // defines @@ -401,7 +401,7 @@ static void _eval(Request& r, MethodPara if(fmt.is_empty()){ r.write(value_result); } else { - r.write(String(format(value_result.as_double(), fmt.cstrm()))); + r.write(String(format_double(value_result.as_double(), fmt.cstrm()))); } } else r.write(value_result); @@ -729,8 +729,8 @@ static Cache_get_result cache_get(Reques static time_t as_expires(Request& r, MethodParams& params, int index, time_t now) { time_t result; - if(Value* vdate=params[index].as(VDATE_TYPE)) - result=(time_t)(static_cast(vdate)->get_time()); + if(VDate* vdate=dynamic_cast(¶ms[index])) + result=vdate->get_time(); else result=now+(time_t)params.as_double(index, "lifespan must be date or number", r);