• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL way to get a date + 3 months?

 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using Tomcat 6.0.26 (JSTL 1.2). I'm trying to clean up my code, but having an issue trying to figure out how I can get an object in JSTL that is today's date plus 3 months. If I wanted today's date, I could just use



so I would I do that as today's date 3 months out? Thanks, - Dave
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSTL is not meant for computation, but for display. This is likely something that should be taken care of in the controller. If it can truly be classified as "display support" (rather than "I'm lazy") then I'd probably create an EL function to perform the math.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!