From 029d6076bab1020941e591471e3acc9a2561ce64 Mon Sep 17 00:00:00 2001
From: woochan lee
Date: Tue, 2 Feb 2016 10:25:30 +0900
Subject: [PATCH] [2.4][online-doc] Add datetime value usage example.
Signed-off-by: woochan lee
Change-Id: I24495b6cad7c4077be770df8eea0f81b3de6cc86
---
.../html/native/efl/component_datetime_mn.htm | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/org.tizen.ui.practices/html/native/efl/component_datetime_mn.htm b/org.tizen.ui.practices/html/native/efl/component_datetime_mn.htm
index fc1d4a3..c017a57 100644
--- a/org.tizen.ui.practices/html/native/efl/component_datetime_mn.htm
+++ b/org.tizen.ui.practices/html/native/efl/component_datetime_mn.htm
@@ -135,6 +135,30 @@ elm_datetime_format_set(datetime, "%d%B%Y");
For a complete list of available specifiers, see the Datetime API.
+Using the Datetime Value
+
+The value of the date and time can be set/get with elm_datetime_value_set()
and elm_datetime_value_get() using a tm struct and related time APIs.
+
+In the following example the datetime value set a time in current locale.
+
+
+time_t local_time = time(NULL);
+struct tm *time_tm = localtime(&local_time);
+struct tm t = *time_tm;
+
+elm_datetime_value_set(datetime, &t);
+
+
+In the following example the datetime value get and print current date.
+
+
+struct tm t;
+
+elm_datetime_value_get(datetime, &t);
+
+printf("%d %d %d", t.tm_mday, t.tm_mon, t.tm_year);
+
+
Using the Datetime Callbacks
To receive notifications about the datetime events, listen to the following signals:
--
2.7.4