⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datetime.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 4 页
字号:
\func{wxDateTime\&}{Set}{\param{wxDateTime\_t }{day}, \param{Month }{month = Inv\_Month}, \param{int }{year = Inv\_Year}, \param{wxDateTime\_t }{hour = 0}, \param{wxDateTime\_t }{minute = 0}, \param{wxDateTime\_t }{second = 0}, \param{wxDateTime\_t }{millisec = 0}}Sets the date and time from the parameters.\membersection{wxDateTime::ResetTime}\label{wxdatetimeresettime}\func{wxDateTime\&}{ResetTime}{\void}Reset time to midnight (00:00:00) without changing the date.\membersection{wxDateTime::SetYear}\label{wxdatetimesetyear}\func{wxDateTime\&}{SetYear}{\param{int }{year}}Sets the year without changing other date components.\membersection{wxDateTime::SetMonth}\label{wxdatetimesetmonth}\func{wxDateTime\&}{SetMonth}{\param{Month }{month}}Sets the month without changing other date components.\membersection{wxDateTime::SetDay}\label{wxdatetimesetday}\func{wxDateTime\&}{SetDay}{\param{wxDateTime\_t }{day}}Sets the day without changing other date components.\membersection{wxDateTime::SetHour}\label{wxdatetimesethour}\func{wxDateTime\&}{SetHour}{\param{wxDateTime\_t }{hour}}Sets the hour without changing other date components.\membersection{wxDateTime::SetMinute}\label{wxdatetimesetminute}\func{wxDateTime\&}{SetMinute}{\param{wxDateTime\_t }{minute}}Sets the minute without changing other date components.\membersection{wxDateTime::SetSecond}\label{wxdatetimesetsecond}\func{wxDateTime\&}{SetSecond}{\param{wxDateTime\_t }{second}}Sets the second without changing other date components.\membersection{wxDateTime::SetMillisecond}\label{wxdatetimesetmillisecond}\func{wxDateTime\&}{SetMillisecond}{\param{wxDateTime\_t }{millisecond}}Sets the millisecond without changing other date components.\membersection{wxDateTime::operator$=$}\label{wxdatetimeoperatoreqtimet}\func{wxDateTime\&}{operator}{\param{time\_t }{timet}}Same as \helpref{Set}{wxdatetimesettimet}.\membersection{wxDateTime::operator$=$}\label{wxdatetimeoperatoreqtm}\func{wxDateTime\&}{operator}{\param{const struct tm\& }{tm}}Same as \helpref{Set}{wxdatetimesettm}.%%%%%%%%%%%%%%%%%%%%%%%%%%% accessors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\membersection{wxDateTime::IsValid}\label{wxdatetimeisvalid}\constfunc{bool}{IsValid}{\void}Returns {\tt true} if the object represents a valid time moment.\membersection{wxDateTime::GetTm}\label{wxdatetimegettm}\constfunc{Tm}{GetTm}{\param{const TimeZone\& }{tz = Local}}Returns broken down representation of the date and time.\membersection{wxDateTime::GetTicks}\label{wxdatetimegetticks}\constfunc{time\_t}{GetTicks}{\void}Returns the number of seconds since Jan 1, 1970. An assert failure will occurif 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}}Returns the year in the given timezone (local one by default).\membersection{wxDateTime::GetMonth}\label{wxdatetimegetmonth}\constfunc{Month}{GetMonth}{\param{const TimeZone\& }{tz = Local}}Returns the month in the given timezone (local one by default).\membersection{wxDateTime::GetDay}\label{wxdatetimegetday}\constfunc{wxDateTime\_t}{GetDay}{\param{const TimeZone\& }{tz = Local}}Returns the day in the given timezone (local one by default).\membersection{wxDateTime::GetWeekDay}\label{wxdatetimegetweekday}\constfunc{WeekDay}{GetWeekDay}{\param{const TimeZone\& }{tz = Local}}Returns the week day in the given timezone (local one by default).\membersection{wxDateTime::GetHour}\label{wxdatetimegethour}\constfunc{wxDateTime\_t}{GetHour}{\param{const TimeZone\& }{tz = Local}}Returns the hour in the given timezone (local one by default).\membersection{wxDateTime::GetMinute}\label{wxdatetimegetminute}\constfunc{wxDateTime\_t}{GetMinute}{\param{const TimeZone\& }{tz = Local}}Returns the minute in the given timezone (local one by default).\membersection{wxDateTime::GetSecond}\label{wxdatetimegetsecond}\constfunc{wxDateTime\_t}{GetSecond}{\param{const TimeZone\& }{tz = Local}}Returns the seconds in the given timezone (local one by default).\membersection{wxDateTime::GetMillisecond}\label{wxdatetimegetmillisecond}\constfunc{wxDateTime\_t}{GetMillisecond}{\param{const TimeZone\& }{tz = Local}}Returns the milliseconds in the given timezone (local one by default).\membersection{wxDateTime::GetDayOfYear}\label{wxdatetimegetdayofyear}\constfunc{wxDateTime\_t}{GetDayOfYear}{\param{const TimeZone\& }{tz = Local}}Returns the day of the year (in $1\ldots366$ range) in the given timezone(local one by default).\membersection{wxDateTime::GetWeekOfYear}\label{wxdatetimegetweekofyear}\constfunc{wxDateTime\_t}{GetWeekOfYear}{\param{WeekFlags }{flags = Monday\_First}, \param{const TimeZone\& }{tz = Local}}Returns the number of the week of the year this date is in. The first week ofthe year is, according to international standards, the one containing Jan 4 or,equivalently, the first week which has Thursday in this year. Both of thesedefinitions are the same as saying that the first week of the year must containmore than half of its days in this year. Accordingly, the week number willalways be in $1\ldots53$ range ($52$ for non-leap years).The function depends on the \helpref{week start}{wxdatetime} conventionspecified by the {\it flags} argument but its results for\texttt{Sunday\_First} are not well-defined as the ISO definition quoted aboveapplies to the weeks starting on Monday only.\membersection{wxDateTime::GetWeekOfMonth}\label{wxdatetimegetweekofmonth}\constfunc{wxDateTime\_t}{GetWeekOfMonth}{\param{WeekFlags }{flags = Monday\_First}, \param{const TimeZone\& }{tz = Local}}Returns the ordinal number of the week in the month (in $1\ldots5$  range).As \helpref{GetWeekOfYear}{wxdatetimegetweekofyear}, this function supportsboth conventions for the week start. See the description of these\helpref{week start}{wxdatetime} conventions.\membersection{wxDateTime::IsWorkDay}\label{wxdatetimeisworkday}\constfunc{bool}{IsWorkDay}{\param{Country }{country = Country\_Default}}Returns {\tt true} is this day is not a holiday in the given country.\membersection{wxDateTime::IsGregorianDate}\label{wxdatetimeisgregoriandate}\constfunc{bool}{IsGregorianDate}{\param{GregorianAdoption }{country = Gr\_Standard}}Returns {\tt true} if the given date is later than the date of adoption of theGregorian calendar in the given country (and hence the Gregorian calendarcalculations make sense for it).%%%%%%%%%%%%%%%%%%%%%% dos date and time format %%%%%%%%%%%%%%%%%%%%%%%\membersection{wxDateTime::SetFromDOS}\label{wxdatetimesetfromdos}\func{wxDateTime\&}{Set}{\param{unsigned long }{ddt}}Sets the date from the date and time in\urlref{DOS}{http://developer.novell.com/ndk/doc/smscomp/index.html?page=/ndk/doc/smscomp/sms\_docs/data/hc2vlu5i.html}format.\membersection{wxDateTime::GetAsDOS}\label{wxdatetimegetasdos}\constfunc{unsigned long}{GetAsDOS}{\void}Returns the date and time in\urlref{DOS}{http://developer.novell.com/ndk/doc/smscomp/index.html?page=/ndk/doc/smscomp/sms\_docs/data/hc2vlu5i.html}format.%%%%%%%%%%%%%%%%%%%%%%%%%%% comparison %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\membersection{wxDateTime::IsEqualTo}\label{wxdatetimeisequalto}\constfunc{bool}{IsEqualTo}{\param{const wxDateTime\& }{datetime}}Returns {\tt true} if the two dates are strictly identical.\membersection{wxDateTime::IsEarlierThan}\label{wxdatetimeisearlierthan}\constfunc{bool}{IsEarlierThan}{\param{const wxDateTime\& }{datetime}}Returns {\tt true} if this date precedes the given one.\membersection{wxDateTime::IsLaterThan}\label{wxdatetimeislaterthan}\constfunc{bool}{IsLaterThan}{\param{const wxDateTime\& }{datetime}}Returns {\tt true} if this date is later than the given one.\membersection{wxDateTime::IsStrictlyBetween}\label{wxdatetimeisstrictlybetween}\constfunc{bool}{IsStrictlyBetween}{\param{const wxDateTime\& }{t1}, \param{const wxDateTime\& }{t2}}Returns {\tt true} if this date lies strictly between the two others,\wxheading{See also}\helpref{IsBetween}{wxdatetimeisbetween}\membersection{wxDateTime::IsBetween}\label{wxdatetimeisbetween}\constfunc{bool}{IsBetween}{\param{const wxDateTime\& }{t1}, \param{const wxDateTime\& }{t2}}Returns {\tt true} if \helpref{IsStrictlyBetween}{wxdatetimeisstrictlybetween}is {\tt true} or if the date is equal to one of the limit values.\wxheading{See also}\helpref{IsStrictlyBetween}{wxdatetimeisstrictlybetween}\membersection{wxDateTime::IsSameDate}\label{wxdatetimeissamedate}\constfunc{bool}{IsSameDate}{\param{const wxDateTime\& }{dt}}Returns {\tt true} if the date is the same without comparing the time parts.\membersection{wxDateTime::IsSameTime}\label{wxdatetimeissametime}\constfunc{bool}{IsSameTime}{\param{const wxDateTime\& }{dt}}Returns {\tt true} if the time is the same (although dates may differ).\membersection{wxDateTime::IsEqualUpTo}\label{wxdatetimeisequalupto}\constfunc{bool}{IsEqualUpTo}{\param{const wxDateTime\& }{dt}, \param{const wxTimeSpan\& }{ts}}Returns {\tt true} if the date is equal to another one up to the given timeinterval, i.e. if the absolute difference between the two dates is less thanthis interval.%%%%%%%%%%%%%%%%%%%%%%%%%%% arithmetics %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\membersection{wxDateTime::Add}\label{wxdatetimeaddts}\constfunc{wxDateTime}{Add}{\param{const wxTimeSpan\& }{diff}}\func{wxDateTime\&}{Add}{\param{const wxTimeSpan\& }{diff}}\func{wxDateTime\&}{operator$+=$}{\param{const wxTimeSpan\& }{diff}}Adds the given time span to this object.\pythonnote{This method is named {\tt AddTS} in wxPython.}\membersection{wxDateTime::Add}\label{wxdatetimeaddds}\constfunc{wxDateTime}{Add}{\param{const wxDateSpan\& }{diff}}\func{wxDateTime\&}{Add}{\param{const wxDateSpan\& }{diff}}\func{wxDateTime\&}{operator$+=$}{\param{const wxDateSpan\& }{diff}}Adds the given date span to this object.\pythonnote{This method is named {\tt AddDS} in wxPython.}\membersection{wxDateTime::Subtract}\label{wxdatetimesubtractts}\constfunc{wxDateTime}{Subtract}{\param{const wxTimeSpan\& }{diff}}\func{wxDateTime\&}{Subtract}{\param{const wxTimeSpan\& }{diff}}\func{wxDateTime\&}{operator$-=$}{\param{const wxTimeSpan\& }{diff}}Subtracts the given time span from this object.\pythonnote{This method is named {\tt SubtractTS} in wxPython.}\membersection{wxDateTime::Subtract}\label{wxdatetimesubtractds}\constfunc{wxDateTime}{Subtract}{\param{const wxDateSpan\& }{diff}}\func{wxDateTime\&}{Subtract}{\param{const wxDateSpan\& }{diff}}\func{wxDateTime\&}{operator$-=$}{\param{const wxDateSpan\& }{diff}}Subtracts the given date span from this object.\pythonnote{This method is named {\tt SubtractDS} in wxPython.}\membersection{wxDateTime::Subtract}\label{wxdatetimesubtractdt}\constfunc{wxTimeSpan}{Subtract}{\param{const wxDateTime\& }{dt}}Subtracts another date from this one and returns the difference between themas wxTimeSpan.%%%%%%%%%%%%%%%%%%%%%%%%%%% parsing/formatting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\membersection{wxDateTime::ParseRfc822Date}\label{wxdatetimeparserfc822date}\func{const wxChar *}{ParseRfc822Date}{\param{const wxChar* }{date}}Parses the string {\it date} looking for a date formatted according to the RFC822 in it. The exact description of this format may, of course, be found inthe RFC (section $5$), but, briefly, this is the format used in the headers ofInternet email messages and one of the most common strings expressing date inthis format may be something like {\tt "Sat, 18 Dec 1999 00:48:30 +0100"}.Returns {\tt NULL} if the conversion failed, otherwise return the pointer tothe character immediately following the part of the string which could beparsed. If the entire string contains only the date in RFC 822 format,the returned pointer will be pointing to a {\tt NUL} character.This function is intentionally strict, it will return an error for any stringwhich is not RFC 822 compliant. If you need to parse date formatted in morefree ways, you should use \helpref{ParseDateTime}{wxdatetimeparsedatetime} or\helpref{ParseDate}{wxdatetimeparsedate} instead.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -