This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Any Alternative for this CODE !!!!!!  RSS feed

 
Swapna Agarwal
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do know there are some mistakes in my CODE, but treating this as psudo code, could any one give me the correct code?
My input:
startDate:03/24/2004
endDate: 02/29/2004
Expected output Should return only SUNDAY's between these 2 dates)
03/21/04
03/14/04
03/07/04
02/29/04

Here is my (psudo) CODE

These are the compilation errors:
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ March 26, 2004: Message edited by: Dirk Schreckmann ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this (dt1 is earlier date)
 
Swapna Agarwal
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow..........Excellent........what a simple logic.That is my exact requirement.
Thank you so much,Thanks to JavaRanch Forums.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!