diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-01-02 12:26:21 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-01-02 12:26:21 +0000 |
commit | 409a8d7b54419b779e6140926a31d7e6e1caac24 (patch) | |
tree | ae68d937c5ed636923f382034a27d83f32668d41 /plugins/UserInfoEx/src/dlg_anniversarylist.cpp | |
parent | a55881036eae9e1434f3349f4fce9140c8c13291 (diff) |
UserInfoEx: fix for output age as 0 and empty birthday date when birthday.year==0
git-svn-id: http://svn.miranda-ng.org/main/trunk@11721 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/dlg_anniversarylist.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/dlg_anniversarylist.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index d76858851f..f7632f0d6a 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -702,13 +702,16 @@ class CAnnivList mir_free(ptszProto);
// forth line: age
- AddSubItem(iItem, COLUMN_AGE, _itot(ad.Age(&mtNow), szText, 10));
+ if (ad.Age(&mtNow))
+ AddSubItem(iItem, COLUMN_AGE, _itot(ad.Age(&mtNow), szText, 10));
+ else
+ AddSubItem(iItem, COLUMN_AGE, _T("???"));
// fifth line: anniversary
AddSubItem(iItem, COLUMN_DESC, (LPTSTR)ad.Description());
// sixth line: date
- ad.DateFormat(szText, SIZEOF(szText));
+ ad.DateFormatAlt(szText, SIZEOF(szText));
AddSubItem(iItem, COLUMN_DATE, szText);
_numRows++;
|