summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-12-22 09:27:38 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-12-22 09:27:38 +0000
commitbc8396728b4b500e7349d84bc58b9ee300d592df (patch)
tree6c91e6c11c647d682637a2830e15118eefdf861e /plugins
parent64e9360e0dbf2cdeef7926e4d20e906895fd6bc3 (diff)
UserInfoEx: fix for birthday reminder when year not set
git-svn-id: http://svn.miranda-ng.org/main/trunk@11575 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/UserInfoEx/src/classMAnnivDate.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp
index b736d434d4..73fb57c38c 100644
--- a/plugins/UserInfoEx/src/classMAnnivDate.cpp
+++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp
@@ -109,7 +109,6 @@ void MAnnivDate::SetDate(MAnnivDate &mda)
__inline BYTE MAnnivDate::IsValid() const
{
return (
- Year() > 1600 &&
Month() > 0 && Month() < 13 &&
Day() > 0 && Day() <= DaysInMonth(Month())
);
@@ -194,6 +193,9 @@ int MAnnivDate::Age(MTime *pNow)
if (pNow) now = *pNow;
else now.GetLocalTime();
+ if (Year() == 0)
+ return 0;
+
age = now.Year() - Year();
if (age > 1 && CompareDays(now) > 0)
age--;
@@ -343,7 +345,6 @@ int MAnnivDate::DBGetDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPC
ZeroDate();
WORD wtmp = db_get_w(hContact, pszModule, szYear, 0);
- if (wtmp < 1601) return 1;
Year(wtmp);
wtmp = db_get_w(hContact, pszModule, szMonth, 0);