forked from enlightenment/efl
test calendar: make format callback function better
Add comments too.
This commit is contained in:
parent
9ba451c98a
commit
20a0d8c26e
|
@ -409,11 +409,12 @@ _cal_format_cb(void *data EINA_UNUSED, Eina_Strbuf *str, const Eina_Value value)
|
|||
{
|
||||
struct tm current_time;
|
||||
|
||||
if (eina_value_type_get(&value) == EINA_VALUE_TYPE_TM)
|
||||
{
|
||||
eina_value_get(&value, ¤t_time);
|
||||
eina_strbuf_append_strftime(str, "<< %b %y >>", ¤t_time);
|
||||
}
|
||||
//return if the value type is other than EINA_VALUE_TYPE_TM
|
||||
if (eina_value_type_get(&value) != EINA_VALUE_TYPE_TM)
|
||||
return;
|
||||
|
||||
eina_value_get(&value, ¤t_time);
|
||||
eina_strbuf_append_strftime(str, "<< %b %y >>", ¤t_time);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue