/**
* Returns an array of the current date.
*/
public Value getdate(@Optional("time()") long time)
{
QDate date = new QDate(false);
date.setLocalTime(1000 * time);
ArrayValue array = new ArrayValueImpl();
array.put("seconds", date.getSecond());
array.put("minutes", date.getMinute());
array.put("hours", date.getHour());
array.put("mday", date.getDayOfMonth());
array.put("wday", date.getDayOfWeek() - 1);
array.put("mon", date.getMonth() + 1);
array.put("year", date.getYear());
array.put("yday", date.getDayOfYear());
array.put("weekday", _fullDayOfWeek[date.getDayOfWeek() - 1]);
array.put("month", _fullMonth[date.getMonth()]);
array.put(LongValue.ZERO, LongValue.create(time));
return array;
}