22 #ifndef _DATE_OBJECT_H_
23 #define _DATE_OBJECT_H_
26 #include "function_object.h"
30 class DateInstanceImp :
public ObjectImp {
32 DateInstanceImp(ObjectImp *proto);
34 virtual const ClassInfo *classInfo()
const {
return &info; }
35 static const ClassInfo info;
44 class DatePrototypeImp :
public DateInstanceImp {
46 DatePrototypeImp(ExecState *exec, ObjectPrototypeImp *objectProto);
47 Value get(ExecState *exec,
const Identifier &p)
const;
48 virtual const ClassInfo *classInfo()
const {
return &info; }
49 static const ClassInfo info;
58 class DateProtoFuncImp :
public InternalFunctionImp {
60 DateProtoFuncImp(ExecState *exec,
int i,
int len);
62 virtual bool implementsCall()
const;
63 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
66 Completion execute(
const List &);
67 enum { ToString, ToDateString, ToTimeString, ToLocaleString,
68 ToLocaleDateString, ToLocaleTimeString, ValueOf, GetTime,
69 GetFullYear, GetMonth, GetDate, GetDay, GetHours, GetMinutes,
70 GetSeconds, GetMilliSeconds, GetTimezoneOffset, SetTime,
71 SetMilliSeconds, SetSeconds, SetMinutes, SetHours, SetDate,
72 SetMonth, SetFullYear, ToUTCString,
74 GetYear, SetYear, ToGMTString };
85 class DateObjectImp :
public InternalFunctionImp {
87 DateObjectImp(ExecState *exec,
88 FunctionPrototypeImp *funcProto,
89 DatePrototypeImp *dateProto);
91 virtual bool implementsConstruct()
const;
92 virtual Object construct(ExecState *exec,
const List &args);
93 virtual bool implementsCall()
const;
94 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
96 Completion execute(
const List &);
97 Object construct(
const List &);
106 class DateObjectFuncImp :
public InternalFunctionImp {
108 DateObjectFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto,
111 virtual bool implementsCall()
const;
112 virtual Value call(ExecState *exec, Object &thisObj,
const List &args);
120 double parseDate(
const UString &u);
121 double KRFCDate_parseDate(
const UString &_date);
122 double timeClip(
double t);
123 double makeTime(
struct tm *t,
double milli,
bool utc);