|
|
| version 1.49, 2003/11/03 11:06:18 | version 1.52, 2003/11/07 13:59:21 |
|---|---|
| Line 19 static const char* IDENT_DATE_C="$Date$" | Line 19 static const char* IDENT_DATE_C="$Date$" |
| class MDate: public Methoded { | class MDate: public Methoded { |
| public: // VStateless_class | public: // VStateless_class |
| Value* create_new_value() { return new VDate(0); } | Value* create_new_value(Pool& apool) { return new VDate(0); } |
| public: | public: |
| MDate(); | MDate(); |
| Line 385 static void _unix_timestamp(Request& r, | Line 385 static void _unix_timestamp(Request& r, |
| // ^date.unix-timestamp[] | // ^date.unix-timestamp[] |
| r.write_no_lang(*new VInt((int)vdate.get_time())); | r.write_no_lang(*new VInt((int)vdate.get_time())); |
| } else { | } else { |
| // ^unix-timestamp(time_t) | if(vdate.get_time()) |
| time_t t=(time_t)params.as_int(0, "Unix timestamp must be integer", r); | throw Exception(0, |
| 0, | |
| "date object already constructed"); | |
| // ^unix-timestamp(time_t) | |
| time_t t=(time_t)params.as_int(0, "Unix timestamp must be integer", r); | |
| vdate.set_time(t); | vdate.set_time(t); |
| } | } |
| } | } |