aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--skype/skype.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/skype/skype.c b/skype/skype.c
index f0f608a7..9f1ee607 100644
--- a/skype/skype.c
+++ b/skype/skype.c
@@ -378,7 +378,12 @@ static gboolean skype_read_callback( gpointer data, gint fd, b_input_condition c
strptime(sd->info_birthday, "%Y%m%d", &tm);
strftime(ib, 256, "%B %d, %Y", &tm);
g_string_append_printf(st, "Birthday: %s\n", ib);
- g_string_append_printf(st, "Age:\n");
+
+ strftime(ib, 256, "%Y", &tm);
+ int year = atoi(ib);
+ time_t t = time(NULL);
+ struct tm *lt = localtime(&t);
+ g_string_append_printf(st, "Age: %d\n", lt->tm_year+1900-year);
}
g_free(sd->info_birthday);
}