Week Tokens

Navigation:  Tokens >

Week Tokens

Previous pageReturn to chapter overviewNext page

Week tokens are used to display information about the week corresponding to the date of a token, or the way that the word "week" is translated in various languages.

 

Below is a chart of the main tokens used to display week information, and some links to topics with additional information. Note that:

 

The tokens in the table below refer to dates of the Gregorian calendar (ie. the standard Western calendar). There are also tokens that allow you to display dates based on the Chinese, Jewish, Korean, Muslim and Orthodox calendars.

Values that are language dependent, are displayed below using the most commonly used English translation. The actual results that you will get will depend on the language selected, and the translation specified in the Tokens and Translations Manager).

 

Additional, less frequently used, tokens are described in the next topics.

 

Name

Token

Values *

Description

Week Number

[w]

1 à 53

The ISO week number of a given date.

[ww]

01 à 53

Same as above, but always with 2 digits.

[sw]

1 à 53

Week number, same as [w], but shown only on the first day of the week (see also the Weekstart option of the GridOptions property).

Week Counting

[wy+]

1 à 53

Week of the year. This token gives the exact same result as the [w] token, above.

[wy-]

52 à 0

Week remaining in the year.

Partial Translation of "Week"

[W]

W

First letter only

[Ww]

eek

Rest of the name, lowercase.

[WW]

EEK

Rest of the name, uppercase.

Abbreviated Translation of "Week"

[wk]

wk

No change in case with respect to its value in the translation table.

[Wk]

Wk

First letter in uppercase.

[WK]

WK

All in uppercase.

Translation of "Week"

[week]

week

No change in case with respect to its value in the translation table.

[Week]

Week

First letter in uppercase.

[WEEK]

WEEK

All in uppercase.

Week Number Ordinal

[.w]

st, nd, rd, th, ...

Short ordinal.

[!w]

First, Second, Third, Fourth, ...

Full ordinal.

UK PAYE Week Number

[paye]


Displays the paye week number used by the British tax authorities, and included in most UK business diaries, as described here.

Estonian School Week Number

[ew]

1 à 53

Similar to [w] and [ww] except that these display the School Week Number as used in Estonia and described here.

[eww]

01 à 53

 

Note that Q++ calculates week numbers based on the ISO definition : week 1 of any year is the week that contains the first Thursday of the year.

 

The above definition means that weeks number 53 occur regularly, and that the 1st of January is often in week 53 of the previous year.

Week numbers are displayed with some special rules when used in MiniCalendars, but in week tokens the week always starts on a Monday.

 

This may seem an artificial rule, but this definition is the same as saying "week 1 is the first week that is mostly in the new year". If the week includes a Thursday then it means 4 out of 7 days of that week (the majority) are in the new year, so it is more in the new year than in the old.


Topic 99 updated on 13-May-2016.
Topic URL: http://www.qppstudio.net/webhelp/index.html?weektokens.htm