From: woochan lee
Date: Tue, 2 Feb 2016 01:28:46 +0000 (+0900)
Subject: [3.0][online-doc] Add datetime value usage example.
X-Git-Tag: tizen_3.0/TD_SYNC/20161201~154^2
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61138ed12d214393ba04348e5810a3523add4b45;p=sdk%2Fonline-doc.git
[3.0][online-doc] Add datetime value usage example.
Signed-off-by: woochan lee
Change-Id: If6cf620438d3454032992106099374cf8dd6634e
---
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: