21 #ifndef _DATE_OBJECT_H_
22 #define _DATE_OBJECT_H_
25 #include "function_object.h"
29 class DateInstanceImp :
public ObjectImp {
31 DateInstanceImp(ObjectImp *proto);
33 virtual const ClassInfo *classInfo()
const {
return &info; }
34 static const ClassInfo info;
43 class DatePrototypeImp :
public DateInstanceImp {
45 DatePrototypeImp(ExecState *exec, ObjectPrototypeImp *objectProto);
46 Value get(ExecState *exec,
const Identifier &p)
const;
47 virtual const ClassInfo *classInfo()
const {
return &info; }
48 static const ClassInfo info;
57 class DateProtoFuncImp :
public InternalFunctionImp {
59 DateProtoFuncImp(ExecState *exec,
int i,
int len);
61 virtual bool implementsCall()
const;
62 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
65 Completion execute(
const List &);
66 enum { ToString, ToDateString, ToTimeString, ToLocaleString,
67 ToLocaleDateString, ToLocaleTimeString, ValueOf, GetTime,
68 GetFullYear, GetMonth, GetDate, GetDay, GetHours, GetMinutes,
69 GetSeconds, GetMilliSeconds, GetTimezoneOffset, SetTime,
70 SetMilliSeconds, SetSeconds, SetMinutes, SetHours, SetDate,
71 SetMonth, SetFullYear, ToUTCString,
73 GetYear, SetYear, ToGMTString };
84 class DateObjectImp :
public InternalFunctionImp {
86 DateObjectImp(ExecState *exec,
87 FunctionPrototypeImp *funcProto,
88 DatePrototypeImp *dateProto);
90 virtual bool implementsConstruct()
const;
91 virtual Object construct(ExecState *exec,
const List &args);
92 virtual bool implementsCall()
const;
93 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
95 Completion execute(
const List &);
96 Object construct(
const List &);
105 class DateObjectFuncImp :
public InternalFunctionImp {
107 DateObjectFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto,
110 virtual bool implementsCall()
const;
111 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
119 double parseDate(
const UString &u);
120 double KRFCDate_parseDate(
const UString &_date);
121 double timeClip(
double t);
122 double makeTime(
struct tm *t,
double milli,
bool utc);