JRS: In article <3f************@hades.is.co.za>, seen in
news:comp.lang.javascript, Jozua <hu***@icon.co.za> posted at Tue, 1 Jul
2003 09:26:54 :-
I require a user to select a date on a JavaScript calendar. Based on the
date selected by the user the system must determine which YEAR and
WEEKNUMBER the user has selected. Does anybody have a "readymade" that can
do this?
Although you do not explicitly say so, you appear to be in South Africa;
I don't know much about relevant SA custom.
Firstly, you must determine whether the week number is to match the
international standard ISO 8601, or one of the seemingly numerous
American standards, or that of the UK Inland Revenue, or something
dreamt up in South Africa, or what.
A routine to calculate ISO week number must also return the possibly-
modified year, and might as well also return the day number : Mon..Sun =
1..7.
Before posting here, it is well to read the newsgroup's FAQ.
Read <URL:http://www.merlyn.demon.co.uk/weekinfo.htm>,
<URL:http://www.merlyn.demon.co.uk/js-date2.htm#Weeks> ff.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.