Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compare two different dates in velocity in Java?

Tags:

velocity

 #set( $currentDate = 'June 1,2016')

 #set( $SettleDate = 'Dec 1,2016')

    #if( $currentDate < $SettleDate)

      <li>xyz</li>

    #end
like image 390
Muthu Avatar asked Nov 23 '25 15:11

Muthu


1 Answers

You can use comparison tool with difference function

  $date.difference('2016-12-01','2016-06-01')

Or whenIs

  $date.whenIs('2016-12-01','2016-06-01')
like image 112
user7294900 Avatar answered Nov 25 '25 11:11

user7294900