ustring format;
// boost::ptr_vector<MNodePtr> par;
int i;
+ MNode* v;
if (args.size () > 0) {
- tm = to_int (mlenv->getVar (args[0]));
- for (i = 1; i < args.size (); i ++) {
- if (i > 1)
- format.append (uColon);
- format.append (args[i]);
+ v = mlenv->getVar (args[0]);
+ if (! isNil (v)) {
+ tm = to_int (v);
+ for (i = 1; i < args.size (); i ++) {
+ if (i > 1)
+ format.append (uColon);
+ format.append (args[i]);
+ }
+ if (format.length () == 0)
+ format = uTimeFormat;
+ mlenv->env->output->out_toHTML (formatDateString (format, tm));
}
- if (format.length () == 0)
- format = uTimeFormat;
-// datetime_list (par, tm);
-// mlenv->env->output->out_toHTML (formatDateString (format, par));
- mlenv->env->output->out_toHTML (formatDateString (format, tm));
}
}