Date problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jozua

    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


  • Dr John Stockton

    #2
    Re: Date problem

    JRS: In article <3f01e4bd$0$226 @hades.is.co.za >, seen in
    news:comp.lang. javascript, Jozua <hugot@icon.co. za> posted at Tue, 1 Jul
    2003 09:26:54 :-[color=blue]
    >
    >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?[/color]

    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.demo n.co.uk/weekinfo.htm>,
    <URL:http://www.merlyn.demo n.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.demo n.co.uk/js-index.htm> JS maths, dates, sources.
    <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.

    Comment

    Working...