]> git.saurik.com Git - wxWidgets.git/commitdiff
added non-static GetCentury(), removed default value for static GetCentury() paramete...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 20 Jul 2006 13:40:11 +0000 (13:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 20 Jul 2006 13:40:11 +0000 (13:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/datetime.tex
include/wx/datetime.h

index 5570afae0768902c9522a5c85ee05a274173e30b..6fc226c1d158a4acadeae2fb27351f6d4e232282 100644 (file)
@@ -202,7 +202,7 @@ supported. Future versions will support other calendars.
 \helpref{ConvertYearToBC}{wxdatetimeconvertyeartobc}\\
 \helpref{GetCurrentMonth}{wxdatetimegetcurrentmonth}\\
 \helpref{IsLeapYear}{wxdatetimeisleapyear}\\
 \helpref{ConvertYearToBC}{wxdatetimeconvertyeartobc}\\
 \helpref{GetCurrentMonth}{wxdatetimegetcurrentmonth}\\
 \helpref{IsLeapYear}{wxdatetimeisleapyear}\\
-\helpref{GetCentury}{wxdatetimegetcentury}\\
+\helpref{GetCentury}{wxdatetimegetcenturystatic}\\
 \helpref{GetNumberOfDays}{wxdatetimegetnumberofdays}\\
 \helpref{GetNumberOfDays}{wxdatetimegetnumberofdays}\\
 \helpref{GetMonthName}{wxdatetimegetmonthname}\\
 \helpref{GetNumberOfDays}{wxdatetimegetnumberofdays}\\
 \helpref{GetNumberOfDays}{wxdatetimegetnumberofdays}\\
 \helpref{GetMonthName}{wxdatetimegetmonthname}\\
@@ -258,6 +258,7 @@ some more complicated calculations to find the answer are under the
 
 \helpref{IsValid}{wxdatetimeisvalid}\\
 \helpref{GetTicks}{wxdatetimegetticks}\\
 
 \helpref{IsValid}{wxdatetimeisvalid}\\
 \helpref{GetTicks}{wxdatetimegetticks}\\
+\helpref{GetCentury}{wxdatetimegetcentury}\\
 \helpref{GetYear}{wxdatetimegetyear}\\
 \helpref{GetMonth}{wxdatetimegetmonth}\\
 \helpref{GetDay}{wxdatetimegetday}\\
 \helpref{GetYear}{wxdatetimegetyear}\\
 \helpref{GetMonth}{wxdatetimegetmonth}\\
 \helpref{GetDay}{wxdatetimegetday}\\
@@ -491,9 +492,9 @@ Get the current year in given calendar (only Gregorian is currently supported).
 Get the current month in given calendar (only Gregorian is currently supported).
 
 
 Get the current month in given calendar (only Gregorian is currently supported).
 
 
-\membersection{wxDateTime::GetCentury}\label{wxdatetimegetcentury}
+\membersection{wxDateTime::GetCentury}\label{wxdatetimegetcenturystatic}
 
 
-\func{static int}{GetCentury}{\param{int }{year = Inv\_Year}}
+\func{static int}{GetCentury}{\param{int }{year}}
 
 Get the current century, i.e. first two digits of the year, in given calendar
 (only Gregorian is currently supported).
 
 Get the current century, i.e. first two digits of the year, in given calendar
 (only Gregorian is currently supported).
@@ -872,6 +873,13 @@ Returns the number of seconds since Jan 1, 1970. An assert failure will occur
 if the date is not in the range covered by {\tt time\_t} type.
 
 
 if the date is not in the range covered by {\tt time\_t} type.
 
 
+\membersection{wxDateTime::GetCentury}\label{wxdatetimegetcentury}
+
+\constfunc{int}{GetCentury}{\param{const TimeZone\& }{tz = Local}}
+
+Returns the century of this date.
+
+
 \membersection{wxDateTime::GetYear}\label{wxdatetimegetyear}
 
 \constfunc{int}{GetYear}{\param{const TimeZone\& }{tz = Local}}
 \membersection{wxDateTime::GetYear}\label{wxdatetimegetyear}
 
 \constfunc{int}{GetYear}{\param{const TimeZone\& }{tz = Local}}
index 80303eba3b72450ac800325bcfc926d4ee5701a7..15f344cbf8266bd866dc8d1e0118394c338e0d1e 100644 (file)
@@ -503,7 +503,7 @@ public:
     static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian);
 
         // get the century (19 for 1999, 20 for 2000 and -5 for 492 BC)
     static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian);
 
         // get the century (19 for 1999, 20 for 2000 and -5 for 492 BC)
-    static int GetCentury(int year = Inv_Year);
+    static int GetCentury(int year);
 
         // returns the number of days in this year (356 or 355 for Gregorian
         // calendar usually :-)
 
         // returns the number of days in this year (356 or 355 for Gregorian
         // calendar usually :-)
@@ -838,6 +838,9 @@ public:
         // if the value is out of range
     inline time_t GetTicks() const;
 
         // if the value is out of range
     inline time_t GetTicks() const;
 
+        // get the century, same as GetCentury(GetYear())
+    int GetCentury(const TimeZone& tz = Local) const
+            { return GetCentury(GetYear(tz)); }
         // get the year (returns Inv_Year if date is invalid)
     int GetYear(const TimeZone& tz = Local) const
             { return GetTm(tz).year; }
         // get the year (returns Inv_Year if date is invalid)
     int GetYear(const TimeZone& tz = Local) const
             { return GetTm(tz).year; }