470,596 Members | 1,460 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,596 developers. It's quick & easy.

Date problem

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
1 2647
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.

Similar topics

11 posts views Thread by David B | last post: by
3 posts views Thread by Dustin Wilson | last post: by
2 posts views Thread by Julie Wardlow | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.