diff options
| author | George Hazan <george.hazan@gmail.com> | 2025-03-20 17:15:42 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2025-03-20 17:15:42 +0300 |
| commit | b07063023ffb6bac667bb865e4d30212b88ff8e2 (patch) | |
| tree | 3ab8ee290d8cdfe25f1ef0c5bc6f1127367a3be0 /protocols/VKontakte/src/vk_thread.cpp | |
| parent | 0be93f29ef172bc008e4b5787f3d01a39c06dad9 (diff) | |
core helper for setting birthday & age
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
| -rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index ba92c7ff06..890701e068 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -368,12 +368,8 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool bFlag, VKContactT if (!wszValue.IsEmpty()) {
int d, m, y, iReadCount;
iReadCount = swscanf(wszValue, L"%d.%d.%d", &d, &m, &y);
- if (iReadCount > 1) {
- if (iReadCount == 3)
- setWord(hContact, "BirthYear", y);
- setByte(hContact, "BirthDay", d);
- setByte(hContact, "BirthMonth", m);
- }
+ if (iReadCount > 1)
+ Contact::SetBirthday(hContact, d, m, (iReadCount == 3) ? y : 0);
}
wszValue = jnItem["photo_100"].as_mstring();
|
