Re: Week Number to Calendar



JRS: In article <dejvug$c7n$1@xxxxxxxxxxxxxxxxxx>, dated Thu, 25 Aug
2005 11:36:33, seen in news:alt.comp.lang.borland-delphi, UN
<ukko_noa@xxxxxxxxxxxxxxxxxxx> posted :
>>From the Delphi help I understood that it is possible to get the week number
>to the 'DatePicker' -component's calendar setting the property weeknumber :=
>true. In the Object Inspector, however, there is not such a property.

Don't trust it, even if it exists; test carefully to determine whether
it gives the sort of week number that you need, and whether it does so
correctly.

There is an International Standard which includes week numbering, ISO
8601, and it is in general use world-wide. Except, of course, in
America, where they use a number of other forms of week-numbering.

I have Pascal/Delphi code to calculate the ISO week number from the
date, in dateprox.pas, uses version.pas, tested by mjd_date.pas, all via
sig line 3 below. See also
<URL:http://www.merlyn.demon.co.uk/weekinfo.htm>
<URL:http://www.merlyn.demon.co.uk/weekcalc.htm>.

Anything that gives the ISO week number needs also to return the Year
Number, and may well return also the day-of-week.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
.