--- parser3/src/classes/op.C 2021/11/09 14:45:06 1.261 +++ parser3/src/classes/op.C 2024/10/02 22:54:02 1.264 @@ -1,8 +1,8 @@ /** @file Parser: parser @b operators. - Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ #include "classes.h" @@ -18,7 +18,7 @@ #include "pa_vclass.h" #include "pa_charset.h" -volatile const char * IDENT_OP_C="$Id: op.C,v 1.261 2021/11/09 14:45:06 moko Exp $"; +volatile const char * IDENT_OP_C="$Id: op.C,v 1.264 2024/10/02 22:54:02 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);