/**
* Returns an array of the current date.
*/
public Value getdate(Env env, @Optional Value timeV)
{
QDate date = env.getDate();
long time;
if (timeV.isDefault())
time = env.getCurrentTime();
else
time = timeV.toLong() * 1000L;
date.setGMTTime(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 / 1000L));
return array;
}