• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kjs
 

kjs

  • kjs
date_object.h
1/*
2 * This file is part of the KDE libraries
3 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 */
20
21#ifndef _DATE_OBJECT_H_
22#define _DATE_OBJECT_H_
23
24#include "internal.h"
25#include "function_object.h"
26
27namespace KJS {
28
29 class DateInstanceImp : public ObjectImp {
30 public:
31 DateInstanceImp(ObjectImp *proto);
32
33 virtual const ClassInfo *classInfo() const { return &info; }
34 static const ClassInfo info;
35 };
36
43 class DatePrototypeImp : public DateInstanceImp {
44 public:
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;
49 };
50
57 class DateProtoFuncImp : public InternalFunctionImp {
58 public:
59 DateProtoFuncImp(ExecState *exec, int i, int len);
60
61 virtual bool implementsCall() const;
62 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
63
64
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,
72 // non-normative properties (Appendix B)
73 GetYear, SetYear, ToGMTString };
74 private:
75 short id;
76 bool utc;
77 };
78
84 class DateObjectImp : public InternalFunctionImp {
85 public:
86 DateObjectImp(ExecState *exec,
87 FunctionPrototypeImp *funcProto,
88 DatePrototypeImp *dateProto);
89
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);
94
95 Completion execute(const List &);
96 Object construct(const List &);
97 };
98
105 class DateObjectFuncImp : public InternalFunctionImp {
106 public:
107 DateObjectFuncImp(ExecState *exec, FunctionPrototypeImp *funcProto,
108 int i, int len);
109
110 virtual bool implementsCall() const;
111 virtual Value call(ExecState *exec, Object &thisObj, const List &args);
112
113 enum { Parse, UTC };
114 private:
115 int id;
116 };
117
118 // helper functions
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);
123
124} // namespace
125
126#endif

kjs

Skip menu "kjs"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kjs

Skip menu "kjs"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kjs by doxygen 1.9.4
This website is maintained by Timothy Pearson.