JSTL Taglib search calculates seconds between two dates

I am looking for taglib to calculate the number of seconds between two dates.

0
source share
1 answer

You just do it with EL:

<jsp:useBean id="now1" class="java.util.Date" /> <jsp:useBean id="now2" class="java.utli.Date" /> The difference is: ${now1.time/1000) - (now2.time/1000)} 

This is just a simple compiled example - in real life, two dates will have different meanings.

+1
source

Source: https://habr.com/ru/post/1393121/


All Articles