projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added wxWindow::Freeze/Thaw(), implemented them for wxGTK::wxTextCtrl
[wxWidgets.git]
/
include
/
wx
/
datetime.inl
diff --git
a/include/wx/datetime.inl
b/include/wx/datetime.inl
index 302d65c1957a7c57e17405f99a690b8f2abaab94..10e929a22a7349e7c6144d3a1c4a23c3c46786d0 100644
(file)
--- a/
include/wx/datetime.inl
+++ b/
include/wx/datetime.inl
@@
-66,7
+66,7
@@
inline wxDateTime wxDateTime::Today()
inline wxDateTime& wxDateTime::Set(time_t timet)
{
// assign first to avoid long multiplication overflow!
inline wxDateTime& wxDateTime::Set(time_t timet)
{
// assign first to avoid long multiplication overflow!
- m_time = timet;
+ m_time = timet
- WX_TIME_BASE_OFFSET
;
m_time *= TIME_T_FACTOR;
return *this;
m_time *= TIME_T_FACTOR;
return *this;
@@
-146,7
+146,7
@@
inline time_t wxDateTime::GetTicks() const
return (time_t)-1;
}
return (time_t)-1;
}
- return (time_t)((m_time / (long)TIME_T_FACTOR).GetLo());
+ return (time_t)((m_time / (long)TIME_T_FACTOR).GetLo())
+WX_TIME_BASE_OFFSET
;
}
inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday,
}
inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday,
@@
-249,7
+249,12
@@
inline bool wxDateTime::IsBetween(const wxDateTime& t1,
inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const
{
inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const
{
- return (m_time - dt.m_time).Abs() < MILLISECONDS_PER_DAY;
+ Tm tm1 = GetTm(),
+ tm2 = dt.GetTm();
+
+ return tm1.year == tm2.year &&
+ tm1.mon == tm2.mon &&
+ tm1.mday == tm2.mday;
}
inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const
}
inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const