Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Retrieve the number of the current week in the year

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): E90
Compatibility
Platform(s): S60 3rd,3rd FP1,3rd Fp2
Platform Security
Capabilities: )
Article
Keywords: keywords= TTime,TTime::WeekNoInYear
Created: lming (01 Nov 2008)
Last edited: hamishwillee (24 Jun 2011)

Overview

This snippet demonstrates how to retrieve the number of the current week in the year. This snippet can be self-signed

Use Case

In some case,week number is used on schedule.for example,a product need to be released at Week 50 of 2008,what is current week number?

Source file

//necessary library
LIBRARY euser.lib
//necessary header file
#include <e32std.h>
 
TTime currentTime;
//current home time will be saved into currentTime object
currentTime.HomeTime();
//retrieve the number of the current week in the year
TInt currentWeekOfThisYear = currentTime.WeekNoInYear();

Postconditions

currentWeekOfThisYear stores the number of the current week in the year. To 22 November 2008,the value is 47.

This page was last modified on 24 June 2011, at 08:38.
31 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×