Efl.Ui.Format: Add support for "struct tm" in string format.

This commit is contained in:
Amitesh Singh 2017-11-14 10:51:03 +09:00
parent 20a0d8c26e
commit 302cc259ff
1 changed files with 6 additions and 1 deletions

View File

@ -24,7 +24,12 @@ _default_format_cb(void *data, Eina_Strbuf *str, const Eina_Value value)
eina_value_get(&value, &v);
eina_strbuf_append_printf(str, sd->template, v);
}
//XXX: handle other types e.g. struct tm
else if (type == EINA_VALUE_TYPE_TM)
{
struct tm v;
eina_value_get(&value, &v);
eina_strbuf_append_strftime(str, sd->template, &v);
}
else
{
char *v = eina_value_to_string(&value);