언어 설정

Menu
Sites
Language
get time in weeks

hello, please tell me how to get the time in weeks, for example, '01 / 01 - 07/01 ', '08 / 01-15/01' I have something I could not find documentation

Responses

7 댓글
hgw7

Hi,
Not sure of your exact format. But you can obtain the week information using Tizen::Locales::TimeField, Tizen::Locales::Week enumerators. The date can also be obtained using the locale namespace. If you want to set any weekly event, can do that using Tizen::Social::Recurrence.

Levan Gogohia

Thanks for the information. please tell me how to get the name of the day of the week, for example, Monday, Tuesday. I found TimeDateSymbols class, but did not understand how to use, if possible with an example. thank you so much.

hgw7

Hi Levan,

You can see the full date along with name of the day using the code below:

DateTimeFormatter* pDateTimeFormatter = DateTimeFormatter::CreateDateFormatterN(DATE_TIME_STYLE_FULL);

DateTime dateTime;

String str;

 

Tizen::System::SystemTime::GetCurrentTime(dateTime);

pDateTimeFormatter->Format(dateTime, str);

AppLog("DateTime %ls", str.GetPointer());

Levan Gogohia

Full day, I know how to look) I would like to see only the name of the day of the week) is in general really)) I'm just looking documents, but do not understand how))

hgw7

You can tokenise the above string to obtain just the Day. 
Or use "E" as the string in ApplyPattern api of DateTimeFormatter class. Also, refer the following link:
https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.native.appprogramming%2Fhtml%2Fguide%2Flocales%2Fdate_time_syntax.htm

Levan Gogohia

Thanx)) its work) greateble) Hmmm. Do you know how to set button in a header In the left screen...

hgw7

Hi,
You can try using ButtonItem as shown below, and perform the actions for 'case ID_BUTTON_HEADER' in OnActionPerformed().

Header* pHeader = GetHeader();

ButtonItem pButtonHeader;
pButtonHeader.Construct(BUTTON_ITEM_STYLE_ICON, ID_BUTTON_HEADER);
pHeader->SetButton(BUTTON_POSITION_LEFT, pButtonHeader);
pHeader->AddActionEventListener(*this);