By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,381 Members | 1,641 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,381 IT Pros & Developers. It's quick & easy.

Date problem

P: n/a
Hi

Can anybody please help.

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?

Thanks

Jozua
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.