Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 7th, 2008, 10:51 AM
Authorized User
 
Join Date: Jul 2008
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to vsempoux
Default problem to get dates based on year and weeknumber

Hello,

on my form i have two selectionlists, one with year selection and another
with weeknumber selection.
Next i have a table like this
day date val
-----------------------------------
monday xxx 1 day worked
tuesday xxx 0.5 day worked
wednesday xxx 0 day worked
thursday
friday
saturday
sunday
------------------------------------
total for week x 2.5 day(s) worked

is there a javascript function that can return me an array with the dates from a chosen
week for a chosen year? (eventualy date formated dd-MM-yyyy)
I have already the ValY(year value) and ValW(weeknumber value).
the array returned should be like [04-08-2008,05-08-2008,06-08-2008,07-08-2008,
08-08-2008,09-08-2008,10-08-2008] where 04-08-2008 is monday and 10-08-2008 sunday.

If anybody could give me some pointers or a link on the web how i can create this function.
Many thanks in advance.

V.

 
Old August 11th, 2008, 01:51 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

I am not sure Javascript allows to manipulate date using week value.
Try the following link for little info about date time functions available in javascript

http://www.quackit.com/javascript/ja..._functions.cfm
http://blog.stevenlevithan.com/archi...te-time-format
http://www.codetoad.com/javascript/date_and_time/


- Rakesh





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem getting the last 4 dates smiter SQL Language 3 January 16th, 2007 05:19 AM
Pull Records based on Dates sprocket Access 3 July 17th, 2006 03:42 PM
How to generate weeknumber/begin of week date in method Access 2 June 22nd, 2005 11:13 AM
How to generate weeknumber and begin of week date method SQL Server 2000 1 June 21st, 2005 01:32 PM
SQL dates - Problem malecumbria Classic ASP Databases 4 February 16th, 2005 01:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.