Diff for /parser3/src/classes/date.C between versions 1.49 and 1.53

version 1.49, 2003/11/03 11:06:18 version 1.53, 2003/11/20 15:35:29
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&) { return new VDate(0); }
   
 public:  public:
         MDate();          MDate();
Line 273  static Table& fill_month_days(Request& r Line 273  static Table& fill_month_days(Request& r
         for(int _day=1-weekDay1; _day<=monthDays;) {          for(int _day=1-weekDay1; _day<=monthDays;) {
                 Table::element_type row(new ArrayString(7));                  Table::element_type row(new ArrayString(7));
                 // calculating year week no [1..54]                  // calculating year week no [1..54]
                 char *weekno_buf;                  char *weekno_buf=0; // surely would be assigned to, but to calm down compiler
                 size_t weekno_size;                  size_t weekno_size=0; // same
                 int weekyear;                  int weekyear=0; // same
                 // 0..6 week days-cells fill with month days                  // 0..6 week days-cells fill with month days
                 for(int wday=0; wday<7; wday++, _day++) {                  for(int wday=0; wday<7; wday++, _day++) {
                         String* cell=new String;                          String* cell=new String;
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);
         }          }
 }  }
   

Removed from v.1.49  
changed lines
  Added in v.1.53


E-mail: