• Post Reply Bookmark Topic Watch Topic
  • New Topic

can someone please help me understand this question.  RSS feed

 
Shiv Tattva
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Write a program to find the date of the monday which comes after the third friday of the nearest month.
Input : yyyy,mm,dd,Day
Output : yyyy,mm,dd,Monday

Im really sorry about missing the below line initially.
suppose the input is 29/1/2014
the output should be 24/2/2014


I also don't know how to start ...please help
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start with the Java Tutorials section about Dates.
 
Paul Clapham
Sheriff
Posts: 22829
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As for understanding the question, I would start by asking the questioner what they mean by "the nearest month". Finding the third Friday of a month is doable, but you first need to know what month you're working with.
 
Mauro Trevigno
Ranch Hand
Posts: 99
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use JODA TIME
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!