--- parser3/src/classes/date.C 2002/11/29 12:13:42 1.41 +++ parser3/src/classes/date.C 2003/01/28 15:42:39 1.42.2.2 @@ -1,11 +1,11 @@ /** @file Parser: @b date parser class. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_DATE_C="$Date: 2002/11/29 12:13:42 $"; +static const char* IDENT_DATE_C="$Date: 2003/01/28 15:42:39 $"; #include "classes.h" #include "pa_request.h" @@ -17,7 +17,7 @@ static const char* IDENT_DATE_C="$Date: class MDate : public Methoded { public: // VStateless_class - Value *create_new_value(Pool& pool) { return new(pool) VDate(pool, 0); } + ValuePtr create_new_value() { return ValuePtr(new VDate(0)); } public: MDate(Pool& pool); @@ -25,6 +25,24 @@ public: // Methoded bool used_directly() { return true; } }; +// helpers + +Table date_calendar_table_template; +/* + // date_calendar_table_template + { + Array *columns=NEW Array(pool); + for(int i=0; i<=6; i++) { + char *column=(char *)pool.malloc(MAX_NUMBER); + snprintf(column, MAX_NUMBER, "%d", i); + *columns+=NEW String(pool, column); // .i column name + } + *columns+=NEW String(pool, DATE_CALENDAR_WEEKNO_NAME); + *columns+=NEW String(pool, DATE_CALENDAR_WEEKYEAR_NAME); + date_calendar_table_template=NEW Table(pool, 0, columns); + } +*/ + // methods static void _now(Request& r, const String& method_name, MethodParams *params) {