]> git.saurik.com Git - wxWidgets.git/commitdiff
Removed obsolete wxDate and wxTime classes.
authorJulian Smart <julian@anthemion.co.uk>
Sun, 23 Mar 2003 20:14:19 +0000 (20:14 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 23 Mar 2003 20:14:19 +0000 (20:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

20 files changed:
configure.in
demos/dbbrowse/std.h
distrib/msw/tmake/filelist.txt
docs/latex/wx/category.tex
docs/latex/wx/classes.tex
docs/latex/wx/date.tex [deleted file]
docs/latex/wx/time.tex [deleted file]
docs/latex/wx/variant.tex
include/wx/date.h [deleted file]
include/wx/mac/setup0.h
include/wx/msw/setup0.h
include/wx/msw/setup_microwin.h
include/wx/time.h [deleted file]
include/wx/variant.h
samples/console/console.cpp
samples/thread/thread.cpp
samples/typetest/typetest.cpp
samples/typetest/typetest.h
src/common/variant.cpp
src/wxWindows.dsp

index 92d3af5534cb013257fac6250bf8c377856ff8b2..b43e602021b3233148edfe7c8f8c8b734352148b 100644 (file)
@@ -344,7 +344,6 @@ if test $DEBUG_CONFIGURE = 1; then
   DEFAULT_wxUSE_STD_IOSTREAM=no
   DEFAULT_wxUSE_CMDLINE_PARSER=no
   DEFAULT_wxUSE_DATETIME=no
   DEFAULT_wxUSE_STD_IOSTREAM=no
   DEFAULT_wxUSE_CMDLINE_PARSER=no
   DEFAULT_wxUSE_DATETIME=no
-  DEFAULT_wxUSE_TIMEDATE=no
   DEFAULT_wxUSE_TIMER=no
   DEFAULT_wxUSE_STOPWATCH=no
   DEFAULT_wxUSE_FILE=no
   DEFAULT_wxUSE_TIMER=no
   DEFAULT_wxUSE_STOPWATCH=no
   DEFAULT_wxUSE_FILE=no
@@ -520,7 +519,6 @@ else
   DEFAULT_wxUSE_STD_IOSTREAM=no
   DEFAULT_wxUSE_CMDLINE_PARSER=yes
   DEFAULT_wxUSE_DATETIME=yes
   DEFAULT_wxUSE_STD_IOSTREAM=no
   DEFAULT_wxUSE_CMDLINE_PARSER=yes
   DEFAULT_wxUSE_DATETIME=yes
-  DEFAULT_wxUSE_TIMEDATE=no
   DEFAULT_wxUSE_TIMER=yes
   DEFAULT_wxUSE_STOPWATCH=yes
   DEFAULT_wxUSE_FILE=yes
   DEFAULT_wxUSE_TIMER=yes
   DEFAULT_wxUSE_STOPWATCH=yes
   DEFAULT_wxUSE_FILE=yes
@@ -774,7 +772,6 @@ WX_ARG_ENABLE(ipc,           [  --enable-ipc            use interprocess communi
 
 WX_ARG_ENABLE(cmdline,       [  --enable-cmdline        use wxCmdLineParser class], wxUSE_CMDLINE_PARSER)
 WX_ARG_ENABLE(datetime,      [  --enable-datetime       use wxDateTime class], wxUSE_DATETIME)
 
 WX_ARG_ENABLE(cmdline,       [  --enable-cmdline        use wxCmdLineParser class], wxUSE_CMDLINE_PARSER)
 WX_ARG_ENABLE(datetime,      [  --enable-datetime       use wxDateTime class], wxUSE_DATETIME)
-WX_ARG_ENABLE(timedate,      [  --enable-timedate       use obsolete wxDate/wxTime classes], wxUSE_TIMEDATE)
 WX_ARG_ENABLE(stopwatch,     [  --enable-stopwatch      use wxStopWatch class], wxUSE_STOPWATCH)
 WX_ARG_ENABLE(dialupman,     [  --enable-dialupman      use dialup network classes], wxUSE_DIALUP_MANAGER)
 WX_ARG_ENABLE(apple_ieee,    [  --enable-apple_ieee     use the Apple IEEE codec], wxUSE_APPLE_IEEE)
 WX_ARG_ENABLE(stopwatch,     [  --enable-stopwatch      use wxStopWatch class], wxUSE_STOPWATCH)
 WX_ARG_ENABLE(dialupman,     [  --enable-dialupman      use dialup network classes], wxUSE_DIALUP_MANAGER)
 WX_ARG_ENABLE(apple_ieee,    [  --enable-apple_ieee     use the Apple IEEE codec], wxUSE_APPLE_IEEE)
@@ -4107,10 +4104,6 @@ if test "$wxUSE_DATETIME" = "yes"; then
   AC_DEFINE(wxUSE_DATETIME)
 fi
 
   AC_DEFINE(wxUSE_DATETIME)
 fi
 
-if test "$wxUSE_TIMEDATE" = "yes"; then
-  AC_DEFINE(wxUSE_TIMEDATE)
-fi
-
 if test "$wxUSE_FILE" = "yes"; then
   AC_DEFINE(wxUSE_FILE)
 fi
 if test "$wxUSE_FILE" = "yes"; then
   AC_DEFINE(wxUSE_FILE)
 fi
@@ -4354,7 +4347,6 @@ if test "$wxUSE_DATETIME" = "yes"; then
         fi
     fi
 
         fi
     fi
 
-    AC_DEFINE(wxUSE_TIMEDATE)
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest"
 fi
 
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest"
 fi
 
index 1f5d591d3fb49ffa2ba67f345e4591b45fe9d8f0..0450f0459b2acb0799750a4376de8aea99fe79eb 100644 (file)
@@ -5,8 +5,6 @@
 //---------------------------------------------------------------------------
 #include <wx/config.h>      // to let wxWindows choose a wxConfig class for your platform
 #include <wx/confbase.h>    // base config class
 //---------------------------------------------------------------------------
 #include <wx/config.h>      // to let wxWindows choose a wxConfig class for your platform
 #include <wx/confbase.h>    // base config class
-// #include <wx/event.h>
-// #include <wx/date.h>
 #include <wx/dbtable.h>
 #include <wx/generic/grid.h>
 #include <wx/file.h>
 #include <wx/dbtable.h>
 #include <wx/generic/grid.h>
 #include <wx/file.h>
 #include <wx/textctrl.h>
 #include <wx/toolbar.h>
 #include <wx/treectrl.h>
 #include <wx/textctrl.h>
 #include <wx/toolbar.h>
 #include <wx/treectrl.h>
-/*
-#ifdef __WXMSW__
-    #include <wx/xpmhand.h>
-#endif
-*/
 //---------------------------
 #include "tabpgwin.h"         // Original name : "controlarea.h"
 //---------------------------
 //---------------------------
 #include "tabpgwin.h"         // Original name : "controlarea.h"
 //---------------------------
index 460c765c92ceb96534e87668a807414e29a9863b..07bf3b3652a4ca9ff85357bd3e859e621219a4d6 100644 (file)
@@ -843,7 +843,6 @@ cshelp.h    WXH
 ctrlsub.h      WXH
 cursor.h       WXH
 dataobj.h      WXH
 ctrlsub.h      WXH
 cursor.h       WXH
 dataobj.h      WXH
-date.h WXH     Base
 datetime.h     WXH     Base
 datetime.inl   WXH     Base
 datstrm.h      WXH     Base
 datetime.h     WXH     Base
 datetime.inl   WXH     Base
 datstrm.h      WXH     Base
@@ -1020,7 +1019,6 @@ textfile.h        WXH     Base
 tglbtn.h       WXH
 thread.h       WXH     Base
 thrimpl.cpp    WXH     Base
 tglbtn.h       WXH
 thread.h       WXH     Base
 thrimpl.cpp    WXH     Base
-time.h WXH     Base
 timer.h        WXH     Base
 tipdlg.h       WXH
 tipwin.h       WXH
 timer.h        WXH     Base
 tipdlg.h       WXH
 tipwin.h       WXH
index 5a77af4789a1cbdf0b912545cba7de6a7b5f3775..5975d2ce90f4828c701d4e191ab24efb86d1c283 100644 (file)
@@ -264,7 +264,6 @@ These are the data structure classes supported by wxWindows.
 \twocolwidtha{6cm}
 \begin{twocollist}\itemsep=0pt
 \twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class}
 \twocolwidtha{6cm}
 \begin{twocollist}\itemsep=0pt
 \twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class}
-\twocolitem{\helpref{wxDate}{wxdate}}{A class for date manipulation (deprecated in favour of wxDateTime)}
 \twocolitem{\helpref{wxDateSpan}{wxdatespan}}{A logical time interval.}
 \twocolitem{\helpref{wxDateTime}{wxdatetime}}{A class for date/time manipulations}
 \twocolitem{\helpref{wxExpr}{wxexpr}}{A class for flexible I/O}
 \twocolitem{\helpref{wxDateSpan}{wxdatespan}}{A logical time interval.}
 \twocolitem{\helpref{wxDateTime}{wxdatetime}}{A class for date/time manipulations}
 \twocolitem{\helpref{wxExpr}{wxexpr}}{A class for flexible I/O}
@@ -286,7 +285,6 @@ These are the data structure classes supported by wxWindows.
 \twocolitem{\helpref{wxStringTokenizer}{wxstringtokenizer}}{A class for interpreting a string as a list of tokens or words}
 \twocolitem{\helpref{wxRealPoint}{wxrealpoint}}{Representation of a point using floating point numbers}
 \twocolitem{\helpref{wxSize}{wxsize}}{Representation of a size}
 \twocolitem{\helpref{wxStringTokenizer}{wxstringtokenizer}}{A class for interpreting a string as a list of tokens or words}
 \twocolitem{\helpref{wxRealPoint}{wxrealpoint}}{Representation of a point using floating point numbers}
 \twocolitem{\helpref{wxSize}{wxsize}}{Representation of a size}
-\twocolitem{\helpref{wxTime}{wxtime}}{A class for time manipulation (deprecated in favour of wxDateTime)}
 \twocolitem{\helpref{wxTimeSpan}{wxtimespan}}{A time interval.}
 \twocolitem{\helpref{wxVariant}{wxvariant}}{A class for storing arbitrary types that may change at run-time}
 \end{twocollist}
 \twocolitem{\helpref{wxTimeSpan}{wxtimespan}}{A time interval.}
 \twocolitem{\helpref{wxVariant}{wxvariant}}{A class for storing arbitrary types that may change at run-time}
 \end{twocollist}
index 04e966ef434ce90b756fb9b98e5612a80628f72c..1e3c59465e565e81c1a6bf4e653e8086b5736b0f 100644 (file)
@@ -60,7 +60,6 @@
 \input dobjcomp.tex
 \input dobjsmpl.tex
 \input datostrm.tex
 \input dobjcomp.tex
 \input dobjsmpl.tex
 \input datostrm.tex
-\input date.tex
 \input datespan.tex
 \input datetime.tex
 \input db.tex
 \input datespan.tex
 \input datetime.tex
 \input db.tex
 \input txtstrm.tex
 \input valtext.tex
 \input thread.tex
 \input txtstrm.tex
 \input valtext.tex
 \input thread.tex
-\input time.tex
 \input timer.tex
 \input timespan.tex
 \input tipprov.tex
 \input timer.tex
 \input timespan.tex
 \input tipprov.tex
diff --git a/docs/latex/wx/date.tex b/docs/latex/wx/date.tex
deleted file mode 100644 (file)
index bd01fbf..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
-\section{\class{wxDate}}\label{wxdate}
-
-A class for manipulating dates.
-
-{\bf NOTE:} this class is retained only for compatibility,
-and has been replaced by \helpref{wxDateTime}{wxdatetime}. wxDate
-may be withdrawn in future versions of wxWindows.
-
-\wxheading{Derived from}
-
-\helpref{wxObject}{wxobject}
-
-\wxheading{Include files}
-
-<wx/date.h>
-
-\wxheading{See also}
-
-\helpref{wxTime}{wxtime}
-
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-\membersection{wxDate::wxDate}\label{wxdateconstr}
-
-\func{}{wxDate}{\void}
-
-Default constructor.
-
-\func{}{wxDate}{\param{const wxDate\&}{ date}}
-
-Copy constructor.
-
-\func{}{wxDate}{\param{int}{ month}, \param{int}{ day}, \param{int}{ year}}
-
-Constructor taking month, day and year.
-
-\func{}{wxDate}{\param{long}{ julian}}
-
-Constructor taking an integer representing the Julian date. This is the number of days since
-1st January 4713 B.C., so to convert from the number of days since 1st January 1901,
-construct a date for 1/1/1901, and add the number of days.
-
-\func{}{wxDate}{\param{const wxString\& }{dateString}}
-
-Constructor taking a string representing a date. This must be either the string TODAY, or of the
-form {\tt MM/DD/YYYY} or {\tt MM-DD-YYYY}. For example:
-
-\begin{verbatim}
-  wxDate date("11/26/1966");
-\end{verbatim}
-
-\wxheading{Parameters}
-
-\docparam{date}{Date to copy.}
-
-\docparam{month}{Month: a number between 1 and 12.}
-
-\docparam{day}{Day: a number between 1 and 31.}
-
-\docparam{year}{Year, such as 1995, 2005.}
-
-\membersection{wxDate::\destruct{wxDate}}
-
-\func{void}{\destruct{wxDate}}{\void}
-
-Destructor.
-
-\membersection{wxDate::AddMonths}\label{wxdateaddmonths}
-
-\func{wxDate\&}{AddMonths}{\param{int}{ months=1}}
-
-Adds the given number of months to the date, returning a reference to `this'.
-
-\membersection{wxDate::AddWeeks}\label{wxdateaddweeks}
-
-\func{wxDate\&}{AddWeeks}{\param{int}{ weeks=1}}
-
-Adds the given number of weeks to the date, returning a reference to `this'.
-
-\membersection{wxDate::AddYears}\label{wxdateaddyears}
-
-\func{wxDate\&}{AddYears}{\param{int}{ years=1}}
-
-Adds the given number of months to the date, returning a reference to `this'.
-
-\membersection{wxDate::FormatDate}\label{wxdateformatdate}
-
-\constfunc{wxString}{FormatDate}{\param{int}{ type=-1}}
-
-Formats the date according to {\it type} if not -1, or according
-to the current display type if -1.
-
-\wxheading{Parameters}
-
-\docparam{type}{-1 or one of:
-
-\begin{twocollist}\itemsep=0pt
-\twocolitem{wxDAY}{Format day only.}
-\twocolitem{wxMONTH}{Format month only.}
-\twocolitem{wxMDY}{Format MONTH, DAY, YEAR.}
-\twocolitem{wxFULL}{Format day, month and year in US style: DAYOFWEEK, MONTH, DAY, YEAR.}
-\twocolitem{wxEUROPEAN}{Format day, month and year in European style: DAY, MONTH, YEAR.}
-\end{twocollist}}
-
-\membersection{wxDate::GetDay}\label{wxdategetday}
-
-\constfunc{int}{GetDay}{\void}
-
-Returns the numeric day (in the range 1 to 31).
-
-\membersection{wxDate::GetDayOfWeek}\label{wxdategetdayofweek}
-
-\constfunc{int}{GetDayOfWeek}{\void}
-
-Returns the integer day of the week (in the range 1 to 7).
-
-\membersection{wxDate::GetDayOfWeekName}\label{wxdategetdayofweekname}
-
-\constfunc{wxString}{GetDayOfWeekName}{\void}
-
-Returns the name of the day of week.
-
-\membersection{wxDate::GetDayOfYear}\label{wxdategetdayofyear}
-
-\constfunc{long}{GetDayOfYear}{\void}
-
-Returns the day of the year (from 1 to 365).
-
-\membersection{wxDate::GetDaysInMonth}\label{wxdategetdaysinmonth}
-
-\constfunc{int}{GetDaysInMonth}{\void}
-
-Returns the number of days in the month (in the range 1 to 31).
-
-\membersection{wxDate::GetFirstDayOfMonth}\label{wxdategetfirstdayofmonth}
-
-\constfunc{int}{GetFirstDayOfMonth}{\void}
-
-Returns the day of week that is first in the month (in the range 1 to 7).
-
-\membersection{wxDate::GetJulianDate}\label{wxdategetjuliandate}
-
-\constfunc{long}{GetJulianDate}{\void}
-
-Returns the Julian date.
-
-\membersection{wxDate::GetMonth}\label{wxdategetmonth}
-
-\constfunc{int}{GetMonth}{\void}
-
-Returns the month number (in the range 1 to 12).
-
-\membersection{wxDate::GetMonthEnd}
-
-\func{wxDate}{GetMonthEnd}{\void}
-
-Returns the date representing the last day of the month.
-
-\membersection{wxDate::GetMonthName}\label{wxdategetmonthname}
-
-\constfunc{wxString}{GetMonthName}{\void}
-
-Returns the name of the month. Do not delete the returned storage.
-
-\membersection{wxDate::GetMonthStart}\label{wxdategetmonthstart}
-
-\constfunc{wxDate}{GetMonthStart}{\void}
-
-Returns the date representing the first day of the month.
-
-\membersection{wxDate::GetWeekOfMonth}\label{wxdategetweekofmonth}
-
-\constfunc{int}{GetWeekOfMonth}{\void}
-
-Returns the week of month (in the range 1 to 6).
-
-\membersection{wxDate::GetWeekOfYear}\label{wxdategetweekofyear}
-
-\constfunc{int}{GetWeekOfYear}{\void}
-
-Returns the week of year (in the range 1 to 52).
-
-\membersection{wxDate::GetYear}\label{wxdategetyear}
-
-\constfunc{int}{GetYear}{\void}
-
-Returns the year as an integer (such as `1995').
-
-\membersection{wxDate::GetYearEnd}\label{wxdategetyearend}
-
-\constfunc{wxDate}{GetYearEnd}{\void}
-
-Returns the date representing the last day of the year.
-
-\membersection{wxDate::GetYearStart}\label{wxdategetyearstart}
-
-\constfunc{wxDate}{GetYearStart}{\void}
-
-Returns the date representing the first day of the year.
-
-\membersection{wxDate::IsLeapYear}\label{wxdateisleapyear}
-
-\constfunc{bool}{IsLeapYear}{\void}
-
-Returns true if the year of this date is a leap year.
-
-\membersection{wxDate::Set}\label{wxdateset}
-
-\func{wxDate\&}{Set}{\void}
-
-Sets the date to current system date, returning a reference to `this'.
-
-\func{wxDate\&}{Set}{\param{long}{ julian}}
-
-Sets the date to the given Julian date, returning a reference to `this'.
-
-\func{wxDate\&}{Set}{\param{int}{ month}, \param{int}{ day}, \param{int}{ year}}
-
-Sets the date to the given date, returning a reference to `this'.
-
-{\it month} is a number from 1 to 12.
-
-{\it day} is a number from 1 to 31.
-
-{\it year} is a year, such as 1995, 2005.
-
-\membersection{wxDate::SetFormat}\label{wxdatesetformat}
-
-\func{void}{SetFormat}{\param{int}{ format}}
-
-Sets the current format type.
-
-\wxheading{Parameters}
-
-\docparam{format}{-1 or one of:
-
-\twocolwidtha{5cm}
-\begin{twocollist}\itemsep=0pt
-\twocolitem{{\bf wxDAY}}{Format day only.}
-\twocolitem{{\bf wxMONTH}}{Format month only.}
-\twocolitem{{\bf wxMDY}}{Format MONTH, DAY, YEAR.}
-\twocolitem{{\bf wxFULL}}{Format day, month and year in US style: DAYOFWEEK, MONTH, DAY, YEAR.}
-\twocolitem{{\bf wxEUROPEAN}}{Format day, month and year in European style: DAY, MONTH, YEAR.}
-\end{twocollist}}
-
-\membersection{wxDate::SetOption}\label{wxdatesetoption}
-
-\func{int}{SetOption}{\param{int}{ option}, \param{const bool}{ enable=true}}
-
-Enables or disables an option for formatting.
-
-\wxheading{Parameters}
-
-\docparam{option}{May be one of:
-
-\twocolwidtha{5cm}
-\begin{twocollist}\itemsep=0pt
-\twocolitem{{\bf wxNO\_CENTURY}}{The century is not formatted.}
-\twocolitem{{\bf wxDATE\_ABBR}}{Month and day names are abbreviated to 3 characters when formatting.}
-\end{twocollist}}
-
-\membersection{wxDate::operator wxString}\label{wxdatewxstring}
-
-\func{}{operator wxString}{\void}
-
-Conversion operator, to convert wxDate to wxString by calling FormatDate.
-
-\membersection{wxDate::operator $+$}\label{wxdateplus}
-
-\func{wxDate}{operator $+$}{\param{long}{ i}}
-
-\func{wxDate}{operator $+$}{\param{int}{ i}}
-
-Adds an integer number of days to the date, returning a date.
-
-\membersection{wxDate::operator $-$}\label{wxdateminus}
-
-\func{wxDate}{operator $-$}{\param{long}{ i}}
-
-\func{wxDate}{operator $-$}{\param{int}{ i}}
-
-Subtracts an integer number of days from the date, returning a date.
-
-\func{long}{operator $-$}{\param{const wxDate\&}{ date}}
-
-Subtracts one date from another, return the number of intervening days.
-
-\membersection{wxDate::operator $+=$}\label{wxdateplusequals}
-
-\func{wxDate\&}{operator $+=$}{\param{long}{ i}}
-
-Postfix operator: adds an integer number of days to the date, returning
-a reference to `this' date.
-
-\membersection{wxDate::operator $-=$}\label{wxdateminusequals}
-
-\func{wxDate\&}{operator $-=$}{\param{long}{ i}}
-
-Postfix operator: subtracts an integer number of days from the date, returning
-a reference to `this' date.
-
-\membersection{wxDate::operator $++$}\label{wxdateplusplus}
-
-\func{wxDate\&}{operator $++$}{\void}
-
-Increments the date (postfix or prefix).
-
-\membersection{wxDate::operator $--$}\label{wxdateminusminus}
-
-\func{wxDate\&}{operator $--$}{\void}
-
-Decrements the date (postfix or prefix).
-
-\membersection{wxDate::operator $<$}\label{wxdatelessthan}
-
-\func{friend bool}{operator $<$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
-
-Function to compare two dates, returning true if {\it date1} is earlier than {\it date2}.
-
-\membersection{wxDate::operator $<=$}\label{wxdatelessthaneq}
-
-\func{friend bool}{operator $<=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
-
-Function to compare two dates, returning true if {\it date1} is earlier than or equal to {\it date2}.
-
-\membersection{wxDate::operator $>$}\label{wxdategreaterthan}
-
-\func{friend bool}{operator $>$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
-
-Function to compare two dates, returning true if {\it date1} is later than {\it date2}.
-
-\membersection{wxDate::operator $>=$}\label{wxdategreaterthaneq}
-
-\func{friend bool}{operator $>=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
-
-Function to compare two dates, returning true if {\it date1} is later than or equal to {\it date2}.
-
-\membersection{wxDate::operator $==$}\label{wxdateequals}
-
-\func{friend bool}{operator $==$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
-
-Function to compare two dates, returning true if {\it date1} is equal to {\it date2}.
-
-\membersection{wxDate::operator $!=$}\label{wxdatenotequals}
-
-\func{friend bool}{operator $!=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
-
-Function to compare two dates, returning true if {\it date1} is not equal to {\it date2}.
-
-\membersection{wxDate::operator \cinsert}\label{wxdateinsert}
-
-\func{friend ostream\&}{operator \cinsert}{\param{ostream\&}{ os}, \param{const wxDate\&}{ date}}
-
-Function to output a wxDate to an ostream.
-
-
diff --git a/docs/latex/wx/time.tex b/docs/latex/wx/time.tex
deleted file mode 100644 (file)
index eaa58d1..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-\section{\class{wxTime}}\label{wxtime}
-
-Representation of time and date.
-
-{\bf NOTE:} this class is retained only for compatibility,
-and has been replaced by \helpref{wxDateTime}{wxdatetime}. wxTime
-may be withdrawn in future versions of wxWindows.
-
-\wxheading{Derived from}
-
-\helpref{wxObject}{wxobject}
-
-\wxheading{Include files}
-
-<wx/time.h>
-
-\wxheading{Data structures}
-
-\begin{verbatim}
-typedef unsigned short hourTy;
-typedef unsigned short minuteTy;
-typedef unsigned short secondTy;
-typedef unsigned long clockTy;
-enum tFormat { wx12h, wx24h };
-enum tPrecision { wxStdMinSec, wxStdMin };
-\end{verbatim}
-
-\wxheading{See also}
-
-\helpref{wxDate}{wxdate}
-
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-\membersection{wxTime::wxTime}\label{wxtimewxtime}
-
-\func{}{wxTime}{\void}
-
-Initialize the object using the current time.
-
-\func{}{wxTime}{\param{clockTy }{s}}
-
-Initialize the object using the number of seconds that have elapsed since ???.
-
-\func{}{wxTime}{\param{const wxTime\&}{ time}}
-
-Copy constructor.
-
-\func{}{wxTime}{\param{hourTy }{h}, \param{minuteTy }{m}, \param{secondTy }{s = 0}, \param{bool }{dst = false}}
-
-Initialize using hours, minutes, seconds, and whether DST time.
-
-\func{}{wxTime}{\param{const wxDate\&}{ date}, \param{hourTy }{h = 0}, \param{minuteTy }{m = 0}, \param{secondTy }{s = 0}, \param{bool }{dst = false}}
-
-Initialize using a \helpref{wxDate}{wxdate} object, hours, minutes, seconds, and whether DST time.
-
-\membersection{wxTime::GetDay}\label{wxtimegetday}
-
-\constfunc{int}{GetDay}{\void}
-
-Returns the day of the month.
-
-\membersection{wxTime::GetDayOfWeek}\label{wxtimegetdatofweek}
-
-\constfunc{int}{GetDayOfWeek}{\void}
-
-Returns the day of the week, a number from 0 to 6 where 0 is Sunday and 6 is Saturday.
-
-\membersection{wxTime::GetHour}\label{wxtimegethour}
-
-\constfunc{hourTy}{GetHour}{\void}
-
-Returns the hour in local time.
-
-\membersection{wxTime::GetHourGMT}\label{wxtimegethourgmt}
-
-\constfunc{hourTy}{GetHourGMT}{\void}
-
-Returns the hour in GMT.
-
-\membersection{wxTime::GetMinute}\label{wxtimegetminute}
-
-\constfunc{minuteTy}{GetMinute}{\void}
-
-Returns the minute in local time.
-
-\membersection{wxTime::GetMinuteGMT}\label{wxtimegetminutegmt}
-
-\constfunc{minuteTy}{GetMinuteGMT}{\void}
-
-Returns the minute in GMT.
-
-\membersection{wxTime::GetMonth}\label{wxtimegetmonth}
-
-\constfunc{int}{GetMonth}{\void}
-
-Returns the month.
-
-\membersection{wxTime::GetSecond}\label{wxtimegetsecond}
-
-\constfunc{secondTy}{GetSecond}{\void}
-
-Returns the second in local time or GMT.
-
-\membersection{wxTime::GetSecondGMT}\label{wxtimegetsecondgmt}
-
-\constfunc{secondTy}{GetSecondGMT}{\void}
-
-Returns the second in GMT.
-
-\membersection{wxTime::GetSeconds}\label{wxtimegetseconds}
-
-\constfunc{clockTy}{GetSeconds}{\void}
-
-Returns the number of seconds since ???.
-
-\membersection{wxTime::GetYear}\label{wxtimegetyear}
-
-\constfunc{int}{GetYear}{\void}
-
-Returns the year.
-
-\membersection{wxTime::FormatTime}\label{wxtimeformattime}
-
-\constfunc{char*}{FormatTime}{\void}
-
-Formats the time according to the current formatting options: see \helpref{wxTime::SetFormat}{wxtimesetformat}.
-
-\membersection{wxTime::IsBetween}\label{wxtimeisbetween}
-
-\constfunc{bool}{IsBetween}{\param{const wxTime\& }{a}, \param{const wxTime\& }{b}}
-
-Returns true if this time is between the two given times.
-
-\membersection{wxTime::Max}\label{wxtimemax}
-
-\constfunc{wxTime}{Max}{\param{const wxTime\& }{time}}
-
-Returns the maximum of the two times.
-
-\membersection{wxTime::Min}\label{wxtimemin}
-
-\constfunc{wxTime}{Min}{\param{const wxTime\& }{time}}
-
-Returns the minimum of the two times.
-
-\membersection{wxTime::SetFormat}\label{wxtimesetformat}
-
-\func{static void}{SetFormat}{\param{const tFormat}{ format = wx12h},
-  \param{const tPrecision}{ precision = wxStdMinSec}}
-
-Sets the format and precision.
-
-\membersection{wxTime::operator char*}\label{wxtimestring}
-
-\func{operator}{char*}{\void}
-
-Returns a pointer to a static char* containing the formatted time.
-
-\membersection{wxTime::operator wxDate}\label{wxtimewxdate}
-
-\constfunc{operator}{wxDate}{\void}
-
-Converts the wxTime into a wxDate.
-
-\membersection{wxTime::operator $=$}\label{wxtimeoperator}
-
-\func{void}{operator $=$}{\param{const wxTime\& }{t}}
-
-Assignment operator.
-
-\membersection{wxTime::operator $<$}\label{wxtimeoperatorle}
-
-\constfunc{bool}{operator $<$}{\param{const wxTime\& }{t}}
-
-Less than operator.
-
-\membersection{wxTime::operator $<=$}\label{wxtimeoperatorleq}
-
-\constfunc{bool}{operator $<=$}{\param{const wxTime\& }{t}}
-
-Less than or equal to operator.
-
-\membersection{wxTime::operator $>$}\label{wxtimeoperatorge}
-
-\constfunc{bool}{operator $>$}{\param{const wxTime\& }{t}}
-
-Greater than operator.
-
-\membersection{wxTime::operator $>=$}\label{wxtimeoperatorgeq}
-
-\constfunc{bool}{operator $>=$}{\param{const wxTime\& }{t}}
-
-Greater than or equal to operator.
-
-\membersection{wxTime::operator $==$}\label{wxtimeoperatoreq}
-
-\constfunc{bool}{operator $==$}{\param{const wxTime\& }{t}}
-
-Equality operator.
-
-\membersection{wxTime::operator $!=$}\label{wxtimeoperatorneq}
-
-\constfunc{bool}{operator $!=$}{\param{const wxTime\& }{t}}
-
-Inequality operator.
-
-\membersection{wxTime::operator $+$}\label{wxtimeoperatorplus}
-
-\constfunc{bool}{operator $+$}{\param{long }{sec}}
-
-Addition operator.
-
-\membersection{wxTime::operator $-$}\label{wxtimeoperatorminus}
-
-\constfunc{bool}{operator $-$}{\param{long }{sec}}
-
-Subtraction operator.
-
-\membersection{wxTime::operator $+=$}\label{wxtimeoperatorpluseq}
-
-\constfunc{bool}{operator $+=$}{\param{long }{sec}}
-
-Increment operator.
-
-\membersection{wxTime::operator $-=$}\label{wxtimeoperatorminuseq}
-
-\constfunc{bool}{operator $-=$}{\param{long }{sec}}
-
-Decrement operator.
-
index 8fe9b75c6eb206f06b7f1f4a6aaf3730f8edf1fc..919900f4162915ea67a6518d54748c168b2f0d85 100644 (file)
@@ -82,14 +82,6 @@ deleting {\it value} and its contents.
 
 %Note: this constructor is currently disabled because it causes a C++ ambiguity.
 
 
 %Note: this constructor is currently disabled because it causes a C++ ambiguity.
 
-\func{}{wxVariant}{\param{const wxTime\&}{ value}, \param{const wxString\& }{name = ``"}}
-
-Construction from a time.
-
-\func{}{wxVariant}{\param{const wxDate\&}{ value}, \param{const wxString\& }{name = ``"}}
-
-Construction from a date.
-
 \func{}{wxVariant}{\param{void*}{ value}, \param{const wxString\& }{name = ``"}}
 
 Construction from a void pointer.
 \func{}{wxVariant}{\param{void*}{ value}, \param{const wxString\& }{name = ``"}}
 
 Construction from a void pointer.
@@ -146,12 +138,6 @@ Returns the character value.
 
 Returns a pointer to the internal variant data.
 
 
 Returns a pointer to the internal variant data.
 
-\membersection{wxVariant::GetDate}\label{wxvariantgetdate}
-
-\constfunc{wxDate}{GetDate}{\void}
-
-Gets the date value.
-
 \membersection{wxVariant::GetDouble}\label{wxvariantgetdouble}
 
 \constfunc{double}{GetDouble}{\void}
 \membersection{wxVariant::GetDouble}\label{wxvariantgetdouble}
 
 \constfunc{double}{GetDouble}{\void}
@@ -176,12 +162,6 @@ Returns a constant reference to the variant name.
 
 Gets the string value.
 
 
 Gets the string value.
 
-\membersection{wxVariant::GetTime}\label{wxvariantgettime}
-
-\constfunc{wxTime}{GetTime}{\void}
-
-Gets the time value.
-
 \membersection{wxVariant::GetType}\label{wxvariantgettype}
 
 \constfunc{wxString}{GetType}{\void}
 \membersection{wxVariant::GetType}\label{wxvariantgettype}
 
 \constfunc{wxString}{GetType}{\void}
@@ -263,10 +243,6 @@ Sets the internal variant data, deleting the existing data if there is any.
 
 \func{void}{operator $=$}{\param{const double }{value}}
 
 
 \func{void}{operator $=$}{\param{const double }{value}}
 
-\func{void}{operator $=$}{\param{const wxDate\& }{value}}
-
-\func{void}{operator $=$}{\param{const wxTime\& }{value}}
-
 \func{void}{operator $=$}{\param{void* }{value}}
 
 \func{void}{operator $=$}{\param{const wxList\& }{value}}
 \func{void}{operator $=$}{\param{void* }{value}}
 
 \func{void}{operator $=$}{\param{const wxList\& }{value}}
@@ -291,10 +267,6 @@ Assignment operators.
 
 \func{bool}{operator $==$}{\param{const double }{value}}
 
 
 \func{bool}{operator $==$}{\param{const double }{value}}
 
-\func{bool}{operator $==$}{\param{const wxDate\& }{value}}
-
-\func{bool}{operator $==$}{\param{const wxTime\& }{value}}
-
 \func{bool}{operator $==$}{\param{void* }{value}}
 
 \func{bool}{operator $==$}{\param{const wxList\& }{value}}
 \func{bool}{operator $==$}{\param{void* }{value}}
 
 \func{bool}{operator $==$}{\param{const wxList\& }{value}}
@@ -319,10 +291,6 @@ Equality test operators.
 
 \func{bool}{operator $!=$}{\param{const double }{value}}
 
 
 \func{bool}{operator $!=$}{\param{const double }{value}}
 
-\func{bool}{operator $!=$}{\param{const wxDate\& }{value}}
-
-\func{bool}{operator $!=$}{\param{const wxTime\& }{value}}
-
 \func{bool}{operator $!=$}{\param{void* }{value}}
 
 \func{bool}{operator $!=$}{\param{const wxList\& }{value}}
 \func{bool}{operator $!=$}{\param{void* }{value}}
 
 \func{bool}{operator $!=$}{\param{const wxList\& }{value}}
@@ -358,24 +326,12 @@ Operator for implicit conversion to a double, using \helpref{wxVariant::GetDoubl
 
 Operator for implicit conversion to a long, using \helpref{wxVariant::GetLong}{wxvariantgetlong}.
 
 
 Operator for implicit conversion to a long, using \helpref{wxVariant::GetLong}{wxvariantgetlong}.
 
-\membersection{wxVariant::operator wxDate}\label{wxvariantwxdate}
-
-\constfunc{wxDate}{operator wxDate}{\void}
-
-Operator for implicit conversion to a wxDate, using \helpref{wxVariant::GetDate}{wxvariantgetdate}.
-
 \membersection{wxVariant::operator wxString}\label{wxvariantwxstring}
 
 \constfunc{wxString}{operator wxString}{\void}
 
 Operator for implicit conversion to a string, using \helpref{wxVariant::MakeString}{wxvariantmakestring}.
 
 \membersection{wxVariant::operator wxString}\label{wxvariantwxstring}
 
 \constfunc{wxString}{operator wxString}{\void}
 
 Operator for implicit conversion to a string, using \helpref{wxVariant::MakeString}{wxvariantmakestring}.
 
-\membersection{wxVariant::operator wxTime}\label{wxvariantwxtime}
-
-\constfunc{wxTime}{operator wxTime}{\void}
-
-Operator for implicit conversion to a wxTime, using \helpref{wxVariant::GetTime}{wxvariantgettime}.
-
 \membersection{wxVariant::operator void*}\label{wxvariantvoid}
 
 \constfunc{void*}{operator void*}{\void}
 \membersection{wxVariant::operator void*}\label{wxvariantvoid}
 
 \constfunc{void*}{operator void*}{\void}
diff --git a/include/wx/date.h b/include/wx/date.h
deleted file mode 100644 (file)
index baebed2..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name:        wx/date.h
-// Purpose:     wxDate class: this class is deprecated, use wxDateTime instead!
-// Author:      Julian Smart, Steve Marcus, Eric Simon, Chris Hill,
-//              Charles D. Price
-// Modified by: 18.12.99 by VZ to use the new wxDateTime class
-// Created:     01/02/97
-// RCS-ID:      $Id$
-// Copyright:   Julian Smart, Steve Marcus, Eric Simon, Chris Hill,
-//              Charles D. Price
-// Licence:     wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DATE_H_
-#define _WX_DATE_H_
-
-#if defined(__GNUG__) && !defined(__APPLE__)
-    #pragma interface "date.h"
-#endif
-
-#include "wx/defs.h"
-
-#if wxUSE_TIMEDATE
-
-#include "wx/object.h"
-#include "wx/string.h"
-#include "wx/datetime.h"
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-enum wxdate_format_type
-{
-    wxMDY,
-    wxDAY,
-    wxMONTH,
-    wxFULL,
-    wxEUROPEAN
-};
-
-enum // wxdate_format_flags
-{
-    wxNO_CENTURY = 0x02,
-    wxDATE_ABBR  = 0x04
-};
-
-// ----------------------------------------------------------------------------
-// wxDate
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDate : public wxObject
-{
-public:
-    wxDate() { Init(); }
-    wxDate(long j) : m_date((double)(j + 0.5)) { Init(); }
-    wxDate(int m, int d, int y) : m_date(d, (wxDateTime::Month)m, y) { Init(); }
-    wxDate(const wxString& dat) { Init(); (void)m_date.ParseDate(dat); }
-    wxDate(const wxDate &date) : wxObject() { *this = date; }
-
-    wxDate(const wxDateTime& dt) { Init(); m_date = dt; }
-
-#ifndef __SALFORDC__
-    operator wxString() const { return FormatDate(); }
-#endif
-
-    void operator=(const wxDate& date)
-    {
-        m_date = date.m_date;
-        m_displayFormat = date.m_displayFormat;
-        m_displayOptions = date.m_displayOptions;
-    }
-
-    void operator=(const wxString& dat) { (void)m_date.ParseDate(dat); }
-
-    wxDate operator+(long i) { return wxDate(GetJulianDate() + i); }
-    wxDate operator+(int  i) { return wxDate(GetJulianDate() + (long)i); }
-
-    wxDate operator-(long i) { return wxDate(GetJulianDate() - i); }
-    wxDate operator-(int  i) { return wxDate(GetJulianDate() - (long)i); }
-
-    long operator-(const wxDate &dt) const
-        { return GetJulianDate() - dt.GetJulianDate(); }
-
-    wxDate &operator+=(long i) { m_date += wxTimeSpan::Days((int)i); return *this; }
-    wxDate &operator-=(long i) { m_date -= wxTimeSpan::Days((int)i); return *this; }
-
-    wxDate &operator++() { return *this += 1; }
-    wxDate &operator++(int) { return *this += 1; }
-    wxDate &operator--() { return *this -= 1; }
-    wxDate &operator--(int) { return *this -= 1; }
-
-#if wxUSE_STD_IOSTREAM
-    friend wxSTD ostream WXDLLEXPORT & operator <<(wxSTD ostream &os, const wxDate &dt)
-        { return os << dt.FormatDate().mb_str(); }
-#endif
-
-    void  SetFormat(int format) { m_displayFormat = format; }
-    int   SetOption(int option, bool enable = TRUE)
-    {
-        if ( enable )
-            m_displayOptions |= option;
-        else
-            m_displayOptions &= ~option;
-
-        return 1; // (VZ: whatever it means)
-    }
-
-    // returns julian date (VZ: the integral part of Julian Day Number)
-    long GetJulianDate() const
-        { return (long)(m_date.GetJulianDayNumber() - 0.5); }
-
-    // returns relative date since Jan. 1
-    int GetDayOfYear() const
-        { return m_date.GetDayOfYear(); }
-
-    // returns TRUE if leap year, FALSE if not
-    bool IsLeapYear() const
-        { return wxDateTime::IsLeapYear(m_date.GetYear()); }
-
-    // Sets to current system date
-    wxDate &Set()
-        { m_date = wxDateTime::Today(); return (wxDate&)*this; }
-    wxDate &Set(long lJulian)
-        { m_date.Set((double)(lJulian + 0.5)); return (wxDate&)*this; }
-    wxDate &Set(int nMonth, int nDay, int nYear)
-        { m_date.Set(nDay, (wxDateTime::Month)nMonth, nYear); return *this; }
-
-    // May also pass neg# to decrement
-    wxDate &AddWeeks(int nCount = 1)
-        { m_date += wxDateSpan::Weeks(nCount); return *this; }
-    wxDate &AddMonths(int nCount = 1)
-        { m_date += wxDateSpan::Months(nCount); return *this; }
-    wxDate &AddYears(int nCount = 1)
-        { m_date += wxDateSpan::Years(nCount); return *this; }
-
-    // Numeric Day of date object
-    int GetDay() const { return m_date.GetDay(); }
-    // Number of days in month(1..31)
-    int GetDaysInMonth() const
-    {
-        return wxDateTime::GetNumberOfDays((wxDateTime::Month)m_date.GetMonth(),
-                                           m_date.GetYear());
-    }
-
-    // First Day Of Month(1..7)
-    int GetFirstDayOfMonth() const
-        { return wxDate(GetMonth(), 1, GetYear()).GetDayOfWeek(); }
-
-    // Character Day Of Week('Sunday'..'Saturday')
-    wxString GetDayOfWeekName() const { return FormatDate(wxDAY); }
-    int GetDayOfWeek() const { return (int)m_date.GetWeekDay() + 1; }
-
-    // Numeric Week Of Month(1..6) (VZ: I'd love to see a month with 6 weeks)
-    int GetWeekOfMonth() const { return m_date.GetWeekOfMonth(); }
-    // Numeric Week Of Year(1..52) (VZ: but there are years with 53 weeks)
-    int GetWeekOfYear() const { return m_date.GetWeekOfYear(); }
-
-    // Character Month name
-    wxString GetMonthName() { return FormatDate(wxMONTH); }
-    // Month Number(1..12)
-    int GetMonth() const { return m_date.GetMonth() + 1; }
-
-    // First Date Of Month
-    wxDate GetMonthStart() const { return(wxDate(GetMonth()-1, 1, GetYear())); }
-    // Last Date Of Month
-    wxDate GetMonthEnd() const { return wxDate(GetMonth(), 1, GetYear())-1; }
-
-    // eg. 1992
-    int GetYear() const { return m_date.GetYear(); }
-    // First Date Of Year
-    wxDate GetYearStart() const { return wxDate(0, 1, GetYear()); }
-    // Last Date Of Year
-    wxDate GetYearEnd() const { return wxDate(0, 1, GetYear()+1) - 1; }
-
-    bool IsBetween(const wxDate& first, const wxDate& second) const
-    {
-        return m_date.IsBetween(first.m_date, second.m_date);
-    }
-
-    wxDate Previous(int dayOfWeek) const
-    {
-        wxDate prev = *this;
-        int dow = GetDayOfWeek();
-        prev -= dayOfWeek > dow ? 7 - (dayOfWeek - dow) : dow - dayOfWeek;
-
-        return prev;
-    }
-
-    wxString FormatDate(int type = -1) const
-    {
-        static const wxChar *formats[] =
-        {
-            // MDY          (week)DAY   MONTH   FULL                 EUROPEAN
-            _T("%m/%d/%Y"), _T("%A"), _T("%B"), _T("%A, %B %d, %Y"), _T("%d %B %Y")
-        };
-
-        wxString fmt = formats[type == -1 ? m_displayFormat : type];
-
-        if ( m_displayOptions & wxDATE_ABBR )
-        {
-            fmt.Replace(_T("A"), _T("a"));
-            fmt.Replace(_T("B"), _T("b"));
-        }
-        if ( m_displayOptions & wxNO_CENTURY )
-        {
-            fmt.Replace(_T("Y"), _T("y"));
-        }
-
-        return m_date.Format(fmt);
-    }
-
-protected:
-    void Init() { m_displayFormat = wxMDY; m_displayOptions = 0; }
-
-#if 0 // the old wxDate members - unused any more
-    unsigned long julian; // see julDate();  days since 1/1/4713 B.C.
-    int month;            // see NMonth()
-    int day;              // see Day()
-    int year;             // see NYear4()
-    int day_of_week;      // see NDOW();  1 = Sunday, ... 7 = Saturday
-
-    void julian_to_mdy();         // convert julian day to mdy
-    void julian_to_wday();        // convert julian day to day_of_week
-    void mdy_to_julian();         // convert mdy to julian day
-#endif // 0
-
-private:
-    wxDateTime m_date;
-
-    int m_displayFormat;
-    int m_displayOptions;
-
-private:
-    DECLARE_DYNAMIC_CLASS(wxDate)
-};
-
-// ----------------------------------------------------------------------------
-// global functions
-// ----------------------------------------------------------------------------
-
-inline bool WXDLLEXPORT operator <(const wxDate &dt1, const wxDate &dt2)
-    { return dt1.GetJulianDate() < dt2.GetJulianDate(); }
-inline bool WXDLLEXPORT operator <=(const wxDate &dt1, const wxDate &dt2)
-    { return dt1.GetJulianDate() <= dt2.GetJulianDate(); }
-inline bool WXDLLEXPORT operator >(const wxDate &dt1, const wxDate &dt2)
-    { return dt1.GetJulianDate() > dt2.GetJulianDate(); }
-inline bool WXDLLEXPORT operator >=(const wxDate &dt1, const wxDate &dt2)
-    { return dt1.GetJulianDate() >= dt2.GetJulianDate(); }
-inline bool WXDLLEXPORT operator ==(const wxDate &dt1, const wxDate &dt2)
-    { return dt1.GetJulianDate() == dt2.GetJulianDate(); }
-inline bool WXDLLEXPORT operator !=(const wxDate &dt1, const wxDate &dt2)
-    { return dt1.GetJulianDate() != dt2.GetJulianDate(); }
-
-#endif // wxUSE_TIMEDATE
-#endif
-    // _WX_DATE_H_
index 360e356636a7566b3e87d0518f51ce1319c59b9d..b194ac453bf6f036964ebe77b540daaf085884ae 100644 (file)
 // Recommended setting: 1
 #define wxUSE_DATETIME      1
 
 // Recommended setting: 1
 #define wxUSE_DATETIME      1
 
-// wxUSE_TIMEDATE enables compilation of the old wxDate and wxTime classes (not
-// the same as wxDateTime!). These classes are obsolete and shouldn't be used
-// in new code
-//
-// Default is 0
-//
-// Recommended setting: 0 unless you have legacy code which uses these classes
-#define wxUSE_TIMEDATE 0
-
 // Set wxUSE_TIMER to 1 to compile wxTimer class
 //
 // Default is 1
 // Set wxUSE_TIMER to 1 to compile wxTimer class
 //
 // Default is 1
index 29200d4fcc5633822651007fdcd8dd9e4f17982c..4b73caeb91dab69c7b7949f41cf6308c0f9caae1 100644 (file)
 // Recommended setting: 1
 #define wxUSE_DATETIME      1
 
 // Recommended setting: 1
 #define wxUSE_DATETIME      1
 
-// wxUSE_TIMEDATE enables compilation of the old wxDate and wxTime classes (not
-// the same as wxDateTime!). These classes are obsolete and shouldn't be used
-// in new code
-//
-// Default is 0
-//
-// Recommended setting: 0 unless you have legacy code which uses these classes
-#define wxUSE_TIMEDATE 0
-
 // Set wxUSE_TIMER to 1 to compile wxTimer class
 //
 // Default is 1
 // Set wxUSE_TIMER to 1 to compile wxTimer class
 //
 // Default is 1
index 3e4e363b8a3d3233efff96ae1d7795e2ee592ca2..bec0f0507ad183945d9dd3eafc62b5f3b3a85f36 100644 (file)
 // Recommended setting: 1
 #define wxUSE_DATETIME      1
 
 // Recommended setting: 1
 #define wxUSE_DATETIME      1
 
-// wxUSE_TIMEDATE enables compilation of the old wxDate and wxTime classes (not
-// the same as wxDateTime!). These classes are obsolete and shouldn't be used
-// in new code
-//
-// Default is 0
-//
-// Recommended setting: 0 unless you have legacy code which uses these classes
-#define wxUSE_TIMEDATE 0
-
 // Set wxUSE_TIMER to 1 to compile wxTimer class
 //
 // Default is 1
 // Set wxUSE_TIMER to 1 to compile wxTimer class
 //
 // Default is 1
diff --git a/include/wx/time.h b/include/wx/time.h
deleted file mode 100644 (file)
index 7b4e53f..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name:        wx/time.h
-// Purpose:     wxTime class, from NIHCL: this class is deprecated, use
-//              wxDateTime instead
-// Author:      Julian Smart, after K. E. Gorlen
-// Modified by: 18.12.99 by VZ to use the new wxDateTime class
-// Created:     01/02/97
-// RCS-ID:      $Id$
-// Copyright:   (c) Julian Smart
-// Licence:     wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_TIMEH__
-#define _WX_TIMEH__
-
-#include "wx/defs.h"
-
-#if wxUSE_TIMEDATE
-
-#include "wx/object.h"
-#include "wx/datetime.h"
-#include "wx/date.h"
-
-#if defined(__GNUG__) && !defined(__APPLE__)
-    #pragma interface "time.h"
-#endif
-
-class WXDLLEXPORT wxDate;
-
-typedef unsigned short hourTy;
-typedef unsigned short minuteTy;
-typedef unsigned short secondTy;
-typedef unsigned long clockTy;
-
-// seconds from 1/1/01 to 1/1/70
-#define wxTIME_EPOCH_DIFF 2177452800UL
-
-class WXDLLEXPORT wxTime : public wxObject
-{
-public:
-    // type definitions
-    enum tFormat { wx12h, wx24h };
-    enum tPrecision { wxStdMinSec, wxStdMin };
-
-public:
-    // current time 
-    wxTime() : m_time(wxDateTime::Now()) { }
-    wxTime(clockTy s) : m_time((time_t)(s - wxTIME_EPOCH_DIFF)) { }
-    void operator=(const wxTime& t) { m_time = t.m_time; }
-    wxTime(const wxTime& t) : wxObject() { *this = t; }
-    wxTime(hourTy h, minuteTy m, secondTy s = 0, bool WXUNUSED(dst) = FALSE)
-        : m_time(h, m, s) { }
-
-    wxTime(const wxDate& d, hourTy h = 0, minuteTy m = 0, secondTy s = 0,
-           bool WXUNUSED(dst) = FALSE)
-           : m_time(d.GetDay(), (wxDateTime::Month)d.GetMonth(), d.GetYear(),
-                    h, m, s) { }
-
-    wxTime(const wxDateTime& time) : m_time(time) { }
-
-    // Convert to string
-#ifndef __SALFORDC__
-    operator wxChar *() const { return FormatTime(); }
-    operator wxDate() const { return wxDate(m_time); }
-#endif
-
-    bool operator< (const wxTime& t) const { return m_time < t.m_time; }
-    bool operator<=(const wxTime& t) const { return m_time <= t.m_time; }
-    bool operator> (const wxTime& t) const { return m_time > t.m_time; }
-    bool operator>=(const wxTime& t) const { return m_time >= t.m_time; }
-    bool operator==(const wxTime& t) const { return m_time == t.m_time; }
-    bool operator!=(const wxTime& t) const { return m_time != t.m_time; }
-
-    friend wxTime WXDLLEXPORT operator+(const wxTime& t, long s)
-        { return wxTime(t.m_time + wxTimeSpan::Seconds((int)s)); }
-    friend wxTime WXDLLEXPORT operator+(long s, const wxTime& t)
-        { return wxTime(t.m_time + wxTimeSpan::Seconds((int)s)); }
-
-    long operator-(const wxTime& t) const
-        { return (m_time - t.m_time).GetValue().ToLong(); }
-    wxTime operator-(long s) const
-        { return wxTime(m_time - wxTimeSpan::Seconds((int)s)); }
-    void operator+=(long s) { m_time += wxTimeSpan::Seconds((int)s); }
-    void operator-=(long s) { m_time -= wxTimeSpan::Seconds((int)s); }
-    bool IsBetween(const wxTime& a, const wxTime& b) const
-        { return *this >= a && *this <= b; }
-
-    // Get day
-    int GetDay() const { return m_time.GetDay(); }
-    // Get month
-    int GetMonth() const { return m_time.GetMonth(); }
-    // Get year
-    int GetYear() const { return m_time.GetYear(); }
-    // Get day of week (0=Sunday 6=Saturday)
-    int GetDayOfWeek() const { return m_time.GetWeekDay(); }
-
-    hourTy GetHour() const { return (hourTy)m_time.GetHour(); }
-    hourTy GetHourGMT() const { return (hourTy)m_time.GetHour(wxDateTime::GMT0); }
-    minuteTy GetMinute() const { return (hourTy)m_time.GetMinute(); }
-    minuteTy GetMinuteGMT() const { return (hourTy)m_time.GetMinute(wxDateTime::GMT0); }
-    secondTy GetSecond() const { return (hourTy)m_time.GetSecond(); }
-    secondTy GetSecondGMT() const { return (hourTy)m_time.GetSecond(wxDateTime::GMT0); }
-
-    clockTy GetSeconds() const { return (clockTy)m_time.GetValue().ToLong(); }
-
-    wxTime Max(const wxTime& t) const { return (t < *this) ? *this : t; }
-    wxTime Min(const wxTime& t) const { return (t > *this) ? *this : t; }
-
-    static void SetFormat(const tFormat lFormat = wx12h,
-                          const tPrecision lPrecision = wxStdMinSec)
-    {
-        ms_Format    = lFormat;
-        ms_Precision  = lPrecision;
-    }
-
-    // (VZ: DANGER: returns pointer to static buffer)
-    wxChar *FormatTime() const
-    {
-        static const wxChar *formats[2][2] =
-        {
-            // wxStdMinSec          wxStdMin
-            { _T("%I:%M:%S %p"), _T("%I:%M %p") },  // wx12h
-            { _T("%H:%M:%S"),    _T("%H:%M")    }   // wx24h
-        };
-
-        wxStrncpy(ms_bufTime, m_time.Format(formats[ms_Format][ms_Precision]),
-                  WXSIZEOF(ms_bufTime));
-
-        return ms_bufTime;
-    }
-
-private:
-    static tFormat      ms_Format;
-    static tPrecision   ms_Precision;
-    static wxChar       ms_bufTime[128];
-
-#if 0 // old wxTime members unused any more
-    clockTy    sec;        /* seconds since 1/1/1901 */
-
-    bool IsDST() const;
-    wxTime GetLocalTime() const;
-
-    // static member functions
-    static wxTime GetLocalTime(const wxDate& date, hourTy h=0, minuteTy m=0, secondTy s=0);
-    static wxTime GetBeginDST(unsigned year);
-    static wxTime GetEndDST(unsigned year);
-#endif // 0
-
-    wxDateTime m_time;
-
-    DECLARE_DYNAMIC_CLASS(wxTime)
-};
-
-#endif
-  // wxUSE_TIMEDATE
-#endif
-    // _WX_TIMEH__
-
index 9375794b80eb1a90f7f721076b533b2e58b1949b..e751dde6c1467b9f9c42490678accf7312af3995 100644 (file)
 #include "wx/string.h"
 #include "wx/list.h"
 
 #include "wx/string.h"
 #include "wx/list.h"
 
-#if wxUSE_TIMEDATE
-    #include "wx/time.h"
-    #include "wx/date.h"
-#endif // time/date
-
 #if wxUSE_DATETIME
     #include "wx/datetime.h"
 #endif // wxUSE_DATETIME
 #if wxUSE_DATETIME
     #include "wx/datetime.h"
 #endif // wxUSE_DATETIME
@@ -99,11 +94,6 @@ public:
     wxVariant(const wxChar* val, const wxString& name = wxEmptyString); // Necessary or VC++ assumes bool!
     wxVariant(const wxStringList& val, const wxString& name = wxEmptyString);
     wxVariant(const wxList& val, const wxString& name = wxEmptyString); // List of variants
     wxVariant(const wxChar* val, const wxString& name = wxEmptyString); // Necessary or VC++ assumes bool!
     wxVariant(const wxStringList& val, const wxString& name = wxEmptyString);
     wxVariant(const wxList& val, const wxString& name = wxEmptyString); // List of variants
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-    wxVariant(const wxTime& val, const wxString& name = wxEmptyString); // Time
-    wxVariant(const wxDate& val, const wxString& name = wxEmptyString); // Date
-#endif
     wxVariant(void* ptr, const wxString& name = wxEmptyString); // void* (general purpose)
     wxVariant(wxVariantData* data, const wxString& name = wxEmptyString); // User-defined data
 //TODO: Need to document
     wxVariant(void* ptr, const wxString& name = wxEmptyString); // void* (general purpose)
     wxVariant(wxVariantData* data, const wxString& name = wxEmptyString); // User-defined data
 //TODO: Need to document
@@ -173,15 +163,6 @@ public:
     bool operator== (const wxList& value) const;
     bool operator!= (const wxList& value) const;
     void operator= (const wxList& value) ;
     bool operator== (const wxList& value) const;
     bool operator!= (const wxList& value) const;
     void operator= (const wxList& value) ;
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-    bool operator== (const wxTime& value) const;
-    bool operator!= (const wxTime& value) const;
-    void operator= (const wxTime& value) ;
-    bool operator== (const wxDate& value) const;
-    bool operator!= (const wxDate& value) const;
-    void operator= (const wxDate& value) ;
-#endif
     bool operator== (void* value) const;
     bool operator!= (void* value) const;
     void operator= (void* value) ;
     bool operator== (void* value) const;
     bool operator!= (void* value) const;
     void operator= (void* value) ;
@@ -199,11 +180,6 @@ public:
     inline operator char () const {  return GetChar(); }
     inline operator long () const {  return GetLong(); }
     inline operator bool () const {  return GetBool(); }
     inline operator char () const {  return GetChar(); }
     inline operator long () const {  return GetLong(); }
     inline operator bool () const {  return GetBool(); }
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-    inline operator wxTime () const {  return GetTime(); }
-    inline operator wxDate () const {  return GetDate(); }
-#endif
     inline operator void* () const {  return GetVoidPtr(); }
 //TODO: Need to document
 #if wxUSE_DATETIME
     inline operator void* () const {  return GetVoidPtr(); }
 //TODO: Need to document
 #if wxUSE_DATETIME
@@ -242,11 +218,6 @@ public:
     wxList& GetList() const ;
     wxStringList& GetStringList() const ;
 
     wxList& GetList() const ;
     wxStringList& GetStringList() const ;
 
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-    wxTime GetTime() const ;
-    wxDate GetDate() const ;
-#endif
     void* GetVoidPtr() const ;
 //TODO: Need to document
 #if wxUSE_DATETIME
     void* GetVoidPtr() const ;
 //TODO: Need to document
 #if wxUSE_DATETIME
@@ -285,11 +256,6 @@ public:
     bool Convert(double* value) const;
     bool Convert(wxString* value) const;
     bool Convert(char* value) const;
     bool Convert(double* value) const;
     bool Convert(wxString* value) const;
     bool Convert(char* value) const;
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-    bool Convert(wxTime* value) const;
-    bool Convert(wxDate* value) const;
-#endif
 //TODO: Need to document
 #if wxUSE_DATETIME
     bool Convert(wxDateTime* value) const;
 //TODO: Need to document
 #if wxUSE_DATETIME
     bool Convert(wxDateTime* value) const;
index 90178e23399329c256f93c4765760ca7bb8e8cdf..3ae5a5a40419096a9a36715ca515ae03ee139a2c 100644 (file)
@@ -1043,7 +1043,7 @@ static void TestFileNameMakeAbsolute()
     {
         const FileNameInfo& fni = filenames[n];
         wxFileName fn(fni.fullname, fni.format);
     {
         const FileNameInfo& fni = filenames[n];
         wxFileName fn(fni.fullname, fni.format);
-        
+
         wxPrintf(_T("'%s' absolutized: "),
                fn.GetFullPath(fni.format).c_str());
         fn.MakeAbsolute();
         wxPrintf(_T("'%s' absolutized: "),
                fn.GetFullPath(fni.format).c_str());
         fn.MakeAbsolute();
@@ -4156,7 +4156,6 @@ static void TestZlibStreamRead()
 
 #include <math.h>
 
 
 #include <math.h>
 
-#include "wx/date.h"
 #include "wx/datetime.h"
 
 // the test data
 #include "wx/datetime.h"
 
 // the test data
@@ -5156,38 +5155,6 @@ static void TestTimeSpanFormat()
     wxPuts(_T(""));
 }
 
     wxPuts(_T(""));
 }
 
-#if 0
-
-// test compatibility with the old wxDate/wxTime classes
-static void TestTimeCompatibility()
-{
-    wxPuts(_T("\n*** wxDateTime compatibility test ***"));
-
-    wxPrintf(_T("wxDate for JDN 0: %s\n"), wxDate(0l).FormatDate().c_str());
-    wxPrintf(_T("wxDate for MJD 0: %s\n"), wxDate(2400000).FormatDate().c_str());
-
-    double jdnNow = wxDateTime::Now().GetJDN();
-    long jdnMidnight = (long)(jdnNow - 0.5);
-    wxPrintf(_T("wxDate for today: %s\n"), wxDate(jdnMidnight).FormatDate().c_str());
-
-    jdnMidnight = wxDate().Set().GetJulianDate();
-    wxPrintf(_T("wxDateTime for today: %s\n"),
-            wxDateTime((double)(jdnMidnight + 0.5)).Format("%c", wxDateTime::GMT0).c_str());
-
-    int flags = wxEUROPEAN;//wxFULL;
-    wxDate date;
-    date.Set();
-    wxPrintf(_T("Today is %s\n"), date.FormatDate(flags).c_str());
-    for ( int n = 0; n < 7; n++ )
-    {
-        wxPrintf(_T("Previous %s is %s\n"),
-               wxDateTime::GetWeekDayName((wxDateTime::WeekDay)n),
-               date.Previous(n + 1).FormatDate(flags).c_str());
-    }
-}
-
-#endif // 0
-
 #endif // TEST_DATETIME
 
 // ----------------------------------------------------------------------------
 #endif // TEST_DATETIME
 
 // ----------------------------------------------------------------------------
index 5e4e5f34c875d658b43b9f5d69aea66f925cda7d..f82f33a5115ab3df2e8eacb6848afc408607d9fc 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "wx/thread.h"
 #include "wx/dynarray.h"
 
 #include "wx/thread.h"
 #include "wx/dynarray.h"
-#include "wx/time.h"
 
 #include "wx/progdlg.h"
 
 
 #include "wx/progdlg.h"
 
@@ -686,13 +685,13 @@ void MyFrame::OnShowCPUs(wxCommandEvent& WXUNUSED(event))
         default:
             msg.Printf(wxT("This system has %d CPUs"), nCPUs);
     }
         default:
             msg.Printf(wxT("This system has %d CPUs"), nCPUs);
     }
-            
+
     wxLogMessage(msg);
 }
 
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
 {
     wxLogMessage(msg);
 }
 
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
 {
-    wxMessageDialog dialog(this, 
+    wxMessageDialog dialog(this,
                            _T("wxWindows multithreaded application sample\n")
                            _T("(c) 1998 Julian Smart, Guilhem Lavaux\n")
                            _T("(c) 1999 Vadim Zeitlin\n")
                            _T("wxWindows multithreaded application sample\n")
                            _T("(c) 1998 Julian Smart, Guilhem Lavaux\n")
                            _T("(c) 1999 Vadim Zeitlin\n")
index dd9dab7be6a6cf030f84fca5f51b77a19f800121..4d8ab2866ddfcd99e19cf488dc6a53c9c4721924 100644 (file)
@@ -24,8 +24,6 @@
 #include "wx/wx.h"
 #endif
 
 #include "wx/wx.h"
 #endif
 
-#include "wx/time.h"
-#include "wx/date.h"
 #include "wx/variant.h"
 #include "wx/mimetype.h"
 
 #include "wx/variant.h"
 #include "wx/mimetype.h"
 
@@ -58,10 +56,6 @@ IMPLEMENT_APP    (MyApp)
 IMPLEMENT_DYNAMIC_CLASS    (MyApp, wxApp)
 
 BEGIN_EVENT_TABLE(MyApp, wxApp)
 IMPLEMENT_DYNAMIC_CLASS    (MyApp, wxApp)
 
 BEGIN_EVENT_TABLE(MyApp, wxApp)
-#if wxUSE_TIMEDATE
-    EVT_MENU(TYPES_DATE,      MyApp::DoDateDemo)
-    EVT_MENU(TYPES_TIME,      MyApp::DoTimeDemo)
-#endif // wxUSE_TIMEDATE
     EVT_MENU(TYPES_VARIANT,   MyApp::DoVariantDemo)
     EVT_MENU(TYPES_BYTEORDER, MyApp::DoByteOrderDemo)
 #if wxUSE_UNICODE
     EVT_MENU(TYPES_VARIANT,   MyApp::DoVariantDemo)
     EVT_MENU(TYPES_BYTEORDER, MyApp::DoByteOrderDemo)
 #if wxUSE_UNICODE
@@ -94,10 +88,6 @@ bool MyApp::OnInit()
     file_menu->Append(TYPES_QUIT, _T("E&xit\tAlt-X"));
 
     wxMenu *test_menu = new wxMenu;
     file_menu->Append(TYPES_QUIT, _T("E&xit\tAlt-X"));
 
     wxMenu *test_menu = new wxMenu;
-#if wxUSE_TIMEDATE
-    test_menu->Append(TYPES_DATE, _T("&Date test"));
-    test_menu->Append(TYPES_TIME, _T("&Time test"));
-#endif // wxUSE_TIMEDATE
     test_menu->Append(TYPES_VARIANT, _T("&Variant test"));
     test_menu->Append(TYPES_BYTEORDER, _T("&Byteorder test"));
 #if wxUSE_UNICODE
     test_menu->Append(TYPES_VARIANT, _T("&Variant test"));
     test_menu->Append(TYPES_BYTEORDER, _T("&Byteorder test"));
 #if wxUSE_UNICODE
@@ -1016,161 +1006,6 @@ void MyApp::DoByteOrderDemo(wxCommandEvent& WXUNUSED(event))
     textCtrl.WriteText( text );
 }
 
     textCtrl.WriteText( text );
 }
 
-#if wxUSE_TIMEDATE
-
-void MyApp::DoTimeDemo(wxCommandEvent& WXUNUSED(event))
-{
-    wxTextCtrl& textCtrl = * GetTextCtrl();
-
-    textCtrl.Clear();
-    textCtrl << _T("\nTest class wxTime:\n");
-    wxTime now;
-    textCtrl << _T("It is now ") << (wxString) now << _T("\n");
-}
-
-void MyApp::DoDateDemo(wxCommandEvent& WXUNUSED(event))
-{
-    wxTextCtrl& textCtrl = * GetTextCtrl();
-
-    textCtrl.Clear();
-    textCtrl << _T("\nTest class wxDate") << _T("\n");
-
-    // Various versions of the constructors
-    // and various output
-
-    wxDate x(10,20,1962);
-
-    textCtrl << x.FormatDate(wxFULL) << _T("  (full)\n");
-
-    // constuctor with a string, just printing the day of the week
-    wxDate y(_T("8/8/1988"));
-
-    textCtrl << y.FormatDate(wxDAY) << _T("  (just day)\n");
-
-    // constructor with a julian
-    wxDate z( 2450000L );
-    textCtrl << z.FormatDate(wxFULL) << _T("  (full)\n");
-
-    // using date addition and subtraction
-    wxDate a = x + 10;
-    textCtrl << a.FormatDate(wxFULL) << _T("  (full)\n");
-    a = a - 25;
-    textCtrl << a.FormatDate(wxEUROPEAN) << _T("  (European)\n");
-
-    // Using subtraction of two date objects
-    wxDate a1 = wxString(_T("7/13/1991"));
-    wxDate a2 = a1 + 14;
-    textCtrl << (a1-a2) << _T("\n");
-    textCtrl << (a2+=10) << _T("\n");
-
-    a1++;
-    textCtrl << _T("Tomorrow= ") << a1.FormatDate(wxFULL) << _T("\n");
-
-    wxDate tmpDate1(_T("08/01/1991"));
-    wxDate tmpDate2(_T("07/14/1991"));
-    textCtrl << _T("a1 (7-14-91) < 8-01-91 ? ==> ") << ((a1 < tmpDate1) ? _T("TRUE") : _T("FALSE")) << _T("\n");
-    textCtrl << _T("a1 (7-14-91) > 8-01-91 ? ==> ") << ((a1 > tmpDate1) ? _T("TRUE") : _T("FALSE")) << _T("\n");
-    textCtrl << _T("a1 (7-14-91)== 7-14-91 ? ==> ") << ((a1==tmpDate2) ? _T("TRUE") : _T("FALSE")) << _T("\n");
-
-    wxDate a3 = a1;
-    textCtrl << _T("a1 (7-14-91)== a3 (7-14-91) ? ==> ") << ((a1==a3) ? _T("TRUE") : _T("FALSE")) << _T("\n");
-    wxDate a4 = a1;
-    textCtrl << _T("a1 (7-14-91)== a4 (7-15-91) ? ==> ") << ((a1==++a4) ? _T("TRUE") : _T("FALSE")) << _T("\n");
-
-    wxDate a5 = wxString(_T("today"));
-    textCtrl << _T("Today is: ") << a5 << _T("\n");
-    a4 = _T("TODAY");
-    textCtrl << _T("Today (a4) is: ") << a4 << _T("\n");
-
-    textCtrl << _T("Today + 4 is: ") << (a4+=4) << _T("\n");
-    a4 = _T("TODAY");
-    textCtrl << _T("Today - 4 is: ") << (a4-=4) << _T("\n");
-
-    textCtrl << _T("=========== Leap Year Test ===========\n");
-    a1 = _T("1/15/1992");
-    textCtrl << a1.FormatDate(wxFULL) << _T("  ") << ((a1.IsLeapYear()) ? _T("Leap") : _T("non-Leap"));
-    textCtrl << _T("  ") << _T("day of year:  ") << a1.GetDayOfYear() << _T("\n");
-
-    a1 = _T("2/16/1993");
-    textCtrl << a1.FormatDate(wxFULL) << _T("  ") << ((a1.IsLeapYear()) ? _T("Leap") : _T("non-Leap"));
-    textCtrl << _T("  ") << _T("day of year:  ") << a1.GetDayOfYear() << _T("\n");
-
-    textCtrl << _T("================== string assignment test ====================\n");
-    wxString date_string=a1;
-    textCtrl << _T("a1 as a string (s/b 2/16/1993) ==> ") << date_string << _T("\n");
-
-    textCtrl << _T("================== SetFormat test ============================\n");
-    a1.SetFormat(wxFULL);
-    textCtrl << _T("a1 (s/b FULL format) ==> ") << a1 << _T("\n");
-    a1.SetFormat(wxEUROPEAN);
-    textCtrl << _T("a1 (s/b EUROPEAN format) ==> ") << a1 << _T("\n");
-
-    textCtrl << _T("================== SetOption test ============================\n");
-    textCtrl << _T("Date abbreviation ON\n");
-
-    a1.SetOption(wxDATE_ABBR);
-    a1.SetFormat(wxMONTH);
-    textCtrl << _T("a1 (s/b MONTH format) ==> ") << a1 << _T("\n");
-    a1.SetFormat(wxDAY);
-    textCtrl << _T("a1 (s/b DAY format) ==> ") << a1 << _T("\n");
-    a1.SetFormat(wxFULL);
-    textCtrl << _T("a1 (s/b FULL format) ==> ") << a1 << _T("\n");
-    a1.SetFormat(wxEUROPEAN);
-    textCtrl << _T("a1 (s/b EUROPEAN format) ==> ") << a1 << _T("\n");
-    textCtrl << _T("Century suppression ON\n");
-    a1.SetOption(wxNO_CENTURY);
-    a1.SetFormat(wxMDY);
-    textCtrl << _T("a1 (s/b MDY format) ==> ") << a1 << _T("\n");
-    textCtrl << _T("Century suppression OFF\n");
-    a1.SetOption(wxNO_CENTURY,FALSE);
-    textCtrl << _T("a1 (s/b MDY format) ==> ") << a1 << _T("\n");
-    textCtrl << _T("Century suppression ON\n");
-    a1.SetOption(wxNO_CENTURY);
-    textCtrl << _T("a1 (s/b MDY format) ==> ") << a1 << _T("\n");
-    a1.SetFormat(wxFULL);
-    textCtrl << _T("a1 (s/b FULL format) ==> ") << a1 << _T("\n");
-
-    textCtrl << _T("\n=============== Version 4.0 Enhancement Test =================\n");
-
-    wxDate v4(_T("11/26/1966"));
-    textCtrl << _T("\n---------- Set Stuff -----------\n");
-    textCtrl << _T("First, 'Set' to today...") << _T("\n");
-    textCtrl << _T("Before 'Set' => ") << v4 << _T("\n");
-    textCtrl << _T("After  'Set' => ") << v4.Set() << _T("\n\n");
-
-    textCtrl << _T("Set to 11/26/66 => ") << v4.Set(11,26,1966) << _T("\n");
-    textCtrl << _T("Current Julian  => ") << v4.GetJulianDate() << _T("\n");
-    textCtrl << _T("Set to Julian 2450000L => ") << v4.Set(2450000L) << _T("\n");
-    textCtrl << _T("See! => ") << v4.GetJulianDate() << _T("\n");
-
-    textCtrl << _T("---------- Add Stuff -----------\n");
-    textCtrl << _T("Start => ") << v4 << _T("\n");
-    textCtrl << _T("Add 4 Weeks => ") << v4.AddWeeks(4) << _T("\n");
-    textCtrl << _T("Sub 1 Month => ") << v4.AddMonths(-1) << _T("\n");
-    textCtrl << _T("Add 2 Years => ") << v4.AddYears(2) << _T("\n");
-
-    textCtrl << _T("---------- Misc Stuff -----------\n");
-    textCtrl << _T("The date aboves' day of the month is => ") << v4.GetDay() << _T("\n");
-    textCtrl << _T("There are ") << v4.GetDaysInMonth() << _T(" days in this month.\n");
-    textCtrl << _T("The first day of this month lands on ") << v4.GetFirstDayOfMonth() << _T("\n");
-    textCtrl << _T("This day happens to be ") << v4.GetDayOfWeekName() << _T("\n");
-    textCtrl << _T("the ") << v4.GetDayOfWeek() << _T(" day of the week,") << _T("\n");
-    textCtrl << _T("on the ") << v4.GetWeekOfYear() << _T(" week of the year,") << _T("\n");
-    textCtrl << _T("on the ") << v4.GetWeekOfMonth() << _T(" week of the month, ") << _T("\n");
-    textCtrl << _T("(which is ") << v4.GetMonthName() << _T(")\n");
-    textCtrl << _T("the ")<< v4.GetMonth() << _T("th month in the year.\n");
-    textCtrl << _T("The year alone is ") << v4.GetYear() << _T("\n");
-
-    textCtrl << _T("---------- First and Last Stuff -----------\n");
-    v4.Set();
-    textCtrl << _T("The first date of this month is ") << v4.GetMonthStart() << _T("\n");
-    textCtrl << _T("The last date of this month is ") << v4.GetMonthEnd() << _T("\n");
-    textCtrl << _T("The first date of this year is ") << v4.GetYearStart() << _T("\n");
-    textCtrl << _T("The last date of this year is ") << v4.GetYearEnd() << _T("\n");
-}
-
-#endif // wxUSE_TIMEDATE
-
 void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
 {
     wxTextCtrl& textCtrl = * GetTextCtrl();
 void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
 {
     wxTextCtrl& textCtrl = * GetTextCtrl();
index 0b1ca03b17baaf9db016b8f5a4dc6de020c35a1e..6c315508cff14a70646ef9c1272629183893852d 100644 (file)
@@ -25,10 +25,6 @@ public:
     bool OnInit();
     int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); }
 
     bool OnInit();
     int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); }
 
-#if wxUSE_TIMEDATE
-    void DoDateDemo(wxCommandEvent& event);
-#endif // wxUSE_TIMEDATE
-    void DoTimeDemo(wxCommandEvent& event);
     void DoVariantDemo(wxCommandEvent& event);
     void DoByteOrderDemo(wxCommandEvent& event);
     void DoStreamDemo(wxCommandEvent& event);
     void DoVariantDemo(wxCommandEvent& event);
     void DoByteOrderDemo(wxCommandEvent& event);
     void DoStreamDemo(wxCommandEvent& event);
index d2ef2fd994cb3b0be68840fe6a26d097207b18cf..c6a70f2a33c74f08411f48e8531d63d10f1a6670 100644 (file)
@@ -11,8 +11,6 @@
 
 #ifdef __GNUG__
 #pragma implementation "variant.h"
 
 #ifdef __GNUG__
 #pragma implementation "variant.h"
-#pragma implementation "time.h"
-#pragma implementation "date.h"
 #endif
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #endif
 
 // For compilers that support precompilation, includes "wx/wx.h".
 
 #include "wx/variant.h"
 
 
 #include "wx/variant.h"
 
-#if wxUSE_TIMEDATE
-IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject)
-IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject)
-
-wxTime::tFormat    wxTime::ms_Format    = wxTime::wx12h;
-wxTime::tPrecision wxTime::ms_Precision  = wxTime::wxStdMinSec;
-wxChar             wxTime::ms_bufTime[128];
-#endif
-
 IMPLEMENT_ABSTRACT_CLASS(wxVariantData, wxObject)
 
 wxVariant WXDLLEXPORT wxNullVariant;
 IMPLEMENT_ABSTRACT_CLASS(wxVariantData, wxObject)
 
 wxVariant WXDLLEXPORT wxNullVariant;
@@ -829,174 +818,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxVariantStringData, wxVariantData)
 IMPLEMENT_DYNAMIC_CLASS(wxVariantDataString, wxVariantData)
 #endif
 
 IMPLEMENT_DYNAMIC_CLASS(wxVariantDataString, wxVariantData)
 #endif
 
-/*
- * wxVariantDataTime
- */
-
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-
-class wxVariantDataTime: public wxVariantData
-{
- DECLARE_DYNAMIC_CLASS(wxVariantDataTime)
-public:
-    wxVariantDataTime() { }
-    wxVariantDataTime(const wxTime& value) { m_value = value; }
-
-    inline wxTime GetValue() const { return m_value; }
-    inline void SetValue(const wxTime& value) { m_value = value; }
-
-    virtual void Copy(wxVariantData& data);
-    virtual bool Eq(wxVariantData& data) const;
-#if wxUSE_STD_IOSTREAM
-    virtual bool Write(wxSTD ostream& str) const;
-#endif
-    virtual bool Write(wxString& str) const;
-#if wxUSE_STD_IOSTREAM
-    virtual bool Read(wxSTD istream& str);
-#endif
-    virtual bool Read(wxString& str);
-    virtual wxString GetType() const { return wxT("time"); };
-    virtual wxVariantData* Clone() { return new wxVariantDataTime; }
-
-protected:
-    wxTime m_value;
-};
-
-IMPLEMENT_DYNAMIC_CLASS(wxVariantDataTime, wxVariantData)
-
-void wxVariantDataTime::Copy(wxVariantData& data)
-{
-    wxASSERT_MSG( (data.GetType() == wxT("time")), wxT("wxVariantDataTime::Copy: Can't copy to this type of data") );
-
-    wxVariantDataTime& otherData = (wxVariantDataTime&) data;
-
-    otherData.m_value = m_value;
-}
-
-bool wxVariantDataTime::Eq(wxVariantData& data) const
-{
-    wxASSERT_MSG( (data.GetType() == wxT("time")), wxT("wxVariantDataTime::Eq: argument mismatch") );
-
-    wxVariantDataTime& otherData = (wxVariantDataTime&) data;
-
-    return (otherData.m_value == m_value);
-}
-
-#if wxUSE_STD_IOSTREAM
-bool wxVariantDataTime::Write(wxSTD ostream& str) const
-{
-    wxString s;
-    Write(s);
-    str << (const char*) s.mb_str();
-    return TRUE;
-}
-#endif
-
-bool wxVariantDataTime::Write(wxString& str) const
-{
-    wxChar*s = m_value.FormatTime();
-    str = s;
-    return TRUE;
-}
-
-#if wxUSE_STD_IOSTREAM
-bool wxVariantDataTime::Read(wxSTD istream& WXUNUSED(str))
-{
-    // Not implemented
-    return FALSE;
-}
-#endif
-
-bool wxVariantDataTime::Read(wxString& WXUNUSED(str))
-{
-    // Not implemented
-    return FALSE;
-}
-
-/*
- * wxVariantDataDate
- */
-
-class wxVariantDataDate: public wxVariantData
-{
- DECLARE_DYNAMIC_CLASS(wxVariantDataDate)
-public:
-    wxVariantDataDate() { }
-    wxVariantDataDate(const wxDate& value) { m_value = value; }
-
-    inline wxDate GetValue() const { return m_value; }
-    inline void SetValue(const wxDate& value) { m_value = value; }
-
-    virtual void Copy(wxVariantData& data);
-    virtual bool Eq(wxVariantData& data) const;
-#if wxUSE_STD_IOSTREAM
-    virtual bool Write(wxSTD ostream& str) const;
-#endif
-    virtual bool Write(wxString& str) const;
-#if wxUSE_STD_IOSTREAM
-    virtual bool Read(wxSTD istream& str);
-#endif
-    virtual bool Read(wxString& str);
-    virtual wxString GetType() const { return wxT("date"); };
-    virtual wxVariantData* Clone() { return new wxVariantDataDate; }
-
-protected:
-    wxDate m_value;
-};
-
-IMPLEMENT_DYNAMIC_CLASS(wxVariantDataDate, wxVariantData)
-
-void wxVariantDataDate::Copy(wxVariantData& data)
-{
-    wxASSERT_MSG( (data.GetType() == wxT("date")), wxT("wxVariantDataDate::Copy: Can't copy to this type of data") );
-
-    wxVariantDataDate& otherData = (wxVariantDataDate&) data;
-
-    otherData.m_value = m_value;
-}
-
-bool wxVariantDataDate::Eq(wxVariantData& data) const
-{
-    wxASSERT_MSG( (data.GetType() == wxT("date")), wxT("wxVariantDataDate::Eq: argument mismatch") );
-
-    wxVariantDataDate& otherData = (wxVariantDataDate&) data;
-
-    return (otherData.m_value == m_value);
-}
-
-#if wxUSE_STD_IOSTREAM
-bool wxVariantDataDate::Write(wxSTD ostream& str) const
-{
-    wxString s;
-    Write(s);
-    str << (const char*) s.mb_str();
-    return TRUE;
-}
-#endif
-
-bool wxVariantDataDate::Write(wxString& str) const
-{
-    str = m_value.FormatDate();
-    return TRUE;
-}
-
-#if wxUSE_STD_IOSTREAM
-bool wxVariantDataDate::Read(wxSTD istream& WXUNUSED(str))
-{
-    // Not implemented
-    return FALSE;
-}
-#endif
-
-bool wxVariantDataDate::Read(wxString& WXUNUSED(str))
-{
-    // Not implemented
-    return FALSE;
-}
-#endif
-  // wxUSE_TIMEDATE
-
 /*
  * wxVariantDataVoidPtr
  */
 /*
  * wxVariantDataVoidPtr
  */
@@ -1342,35 +1163,6 @@ wxVariant::wxVariant(const wxList& val, const wxString& name) // List of variant
     m_name = name;
 }
 
     m_name = name;
 }
 
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-wxVariant::wxVariant(const wxTime& val, const wxString& name) // Time
-{
-    m_data = new wxVariantDataTime(val);
-    m_name = name;
-}
-
-wxVariant::wxVariant(const wxDate& val, const wxString& name) // Date
-{
-    m_data = new wxVariantDataDate(val);
-    m_name = name;
-}
-#endif
-
-wxVariant::wxVariant(void* val, const wxString& name) // Void ptr
-{
-    m_data = new wxVariantDataVoidPtr(val);
-    m_name = name;
-}
-
-#if wxUSE_DATETIME
-wxVariant::wxVariant(const wxDateTime& val, const wxString& name) // Date
-{
-    m_data = new wxVariantDataDateTime(val);
-    m_name = name;
-}
-#endif // wxUSE_DATETIME
-
 #if wxUSE_ODBC
 wxVariant::wxVariant(const TIME_STRUCT* valptr, const wxString& name) // Date
 {
 #if wxUSE_ODBC
 wxVariant::wxVariant(const TIME_STRUCT* valptr, const wxString& name) // Date
 {
@@ -1684,65 +1476,6 @@ void wxVariant::operator= (const wxList& value)
     }
 }
 
     }
 }
 
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-bool wxVariant::operator== (const wxTime& value) const
-{
-    wxTime thisValue;
-    if (!Convert(&thisValue))
-        return FALSE;
-
-    return value == thisValue;
-}
-
-bool wxVariant::operator!= (const wxTime& value) const
-{
-    return (!((*this) == value));
-}
-
-void wxVariant::operator= (const wxTime& value)
-{
-    if (GetType() == wxT("time"))
-    {
-        ((wxVariantDataTime*)GetData())->SetValue(value);
-    }
-    else
-    {
-        if (m_data)
-            delete m_data;
-        m_data = new wxVariantDataTime(value);
-    }
-}
-
-bool wxVariant::operator== (const wxDate& value) const
-{
-    wxDate thisValue;
-    if (!Convert(&thisValue))
-        return FALSE;
-
-    return (value == thisValue);
-}
-
-bool wxVariant::operator!= (const wxDate& value) const
-{
-    return (!((*this) == value));
-}
-
-void wxVariant::operator= (const wxDate& value)
-{
-    if (GetType() == wxT("date"))
-    {
-        ((wxVariantDataTime*)GetData())->SetValue(value);
-    }
-    else
-    {
-        if (m_data)
-            delete m_data;
-        m_data = new wxVariantDataDate(value);
-    }
-}
-#endif
-
 bool wxVariant::operator== (void* value) const
 {
     return (value == ((wxVariantDataVoidPtr*)GetData())->GetValue());
 bool wxVariant::operator== (void* value) const
 {
     return (value == ((wxVariantDataVoidPtr*)GetData())->GetValue());
@@ -2007,31 +1740,6 @@ wxString wxVariant::GetString() const
     return value;
 }
 
     return value;
 }
 
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-wxTime wxVariant::GetTime() const
-{
-    wxTime value;
-    if (!Convert(& value))
-    {
-        wxFAIL_MSG(wxT("Could not convert to a time"));
-    }
-
-    return value;
-}
-
-wxDate wxVariant::GetDate() const
-{
-    wxDate value;
-    if (!Convert(& value))
-    {
-        wxFAIL_MSG(wxT("Could not convert to a date"));
-    }
-
-    return value;
-}
-#endif // wxUSE_TIMEDATE
-
 void* wxVariant::GetVoidPtr() const
 {
     wxASSERT( (GetType() == wxT("void*")) );
 void* wxVariant::GetVoidPtr() const
 {
     wxASSERT( (GetType() == wxT("void*")) );
@@ -2225,33 +1933,6 @@ bool wxVariant::Convert(wxString* value) const
     return TRUE;
 }
 
     return TRUE;
 }
 
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-bool wxVariant::Convert(wxTime* value) const
-{
-    wxString type(GetType());
-    if (type == wxT("time"))
-        *value = ((wxVariantDataTime*)GetData())->GetValue();
-    else if (type == wxT("date"))
-        *value = wxTime(((wxVariantDataDate*)GetData())->GetValue());
-    else
-        return FALSE;
-
-    return TRUE;
-}
-
-bool wxVariant::Convert(wxDate* value) const
-{
-    wxString type(GetType());
-    if (type == wxT("date"))
-        *value = ((wxVariantDataDate*)GetData())->GetValue();
-    else
-        return FALSE;
-
-    return TRUE;
-}
-#endif // wxUSE_TIMEDATE
-
 #if wxUSE_DATETIME
 bool wxVariant::Convert(wxDateTime* value) const
 {
 #if wxUSE_DATETIME
 bool wxVariant::Convert(wxDateTime* value) const
 {
index 7058753445285afb5e8258b4822079b4bd36c6f2..d24519d27c9b4bb0b8e1841dd853eca0c3696928 100644 (file)
@@ -1674,10 +1674,6 @@ SOURCE=..\include\wx\dataobj.h
 # End Source File
 # Begin Source File
 
 # End Source File
 # Begin Source File
 
-SOURCE=..\include\wx\date.h
-# End Source File
-# Begin Source File
-
 SOURCE=..\include\wx\datetime.h
 # End Source File
 # Begin Source File
 SOURCE=..\include\wx\datetime.h
 # End Source File
 # Begin Source File
@@ -2366,10 +2362,6 @@ SOURCE=..\include\wx\thread.h
 # End Source File
 # Begin Source File
 
 # End Source File
 # Begin Source File
 
-SOURCE=..\include\wx\time.h
-# End Source File
-# Begin Source File
-
 SOURCE=..\include\wx\timer.h
 # End Source File
 # Begin Source File
 SOURCE=..\include\wx\timer.h
 # End Source File
 # Begin Source File