This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Help needed in getting last 90 days week-ending dates i.e friday's dates

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have a requirement to get all friday[week end's] dates for last 3 months including current week.

For example if today is 28/07/2016 i.e Thursday then need to get 29/07/2016, 22/07/2016, 15/07/2016 , 08/07/2016 ............. 06/04/2016

Kindly help me on this.

Thanks & Regards,
Chakrapani
 
Marshal
Posts: 67390
257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go through the Java™ Tutorials. The local date class has method for finding the date for a particular day of the week, probably using the day of week enum. Had you delayed posted this question until tomorrow, which is a Friday, write down the date of the last Friday in your sequence.
 
ChakraPani Margani
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply. requirement is just to include current week friday as well. Kindly provide me some sample code snippet to help. I am quite new to this.
for example : If i need last 30 day's friday dates then required output will be
29/07/2016
22/07/2016
15/07/2016
8/07/2016
1/07/2016

Appreciate your help on this.

Thanks in advance
 
Campbell Ritchie
Marshal
Posts: 67390
257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didn't you see how to get next WEDNESDAY in the Java™ Tutorials section
 
I will suppress my every urge. But not this shameless plug:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!