# Compare Dates

**URL:** <https://forum.kirupa.com/t/compare-dates/301208>\
**Category:** programming\
**Created:** [December 5, 2009, 3:56am UTC](https://forum.kirupa.com/t/compare-dates/301208 "2009-12-05T03:56:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RyanGus](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@RyanGus](https://forum.kirupa.com/u/RyanGus)\
**Post date:** [December 5, 2009, 3:56am UTC](https://forum.kirupa.com/t/compare-dates/301208/1 "2009-12-05T03:56:04Z")

</div>

hello all… excellent site !!! i have found so many answers here i hope you guys can help me with this one, i have a big headacke… i’m renewing a site for a friend and i cant find a solution to my upcoming question.

He wants like a gallery but only text, i need to load a different text everyday of the year (they’re call rhemas, they’re like messages), so, i can load them already with a java calendar, everything its good so far but he also would like to keep the upcoming rhemas unknown…

for example: if today is 04/12/2009 the user wont be able to see the rhemas from 05/12/2009 and on… and that has to change every night. so i did it the last year with 365 btns lol, i check the dates on every btn with .getTime and place an if to compare with the seconds since 1970.

the problem is that i have to use a calendar to get the seconds for everyday to compare so i figure that it has to be a better way to do it.

what i’m trying to do now its to get the date from a java calendar and get the value from the field with “ExternalInterface.call” to call each .txt everyday but i cant figure out something to compare when the user pick a random day from the future… to not load that days rhema… i need like enable the buttons from tomorrows and on or something like that but i don’t know much about java… i can see the resembled to AS tough.

Here are the links and files to see if someone can help me out…

This is what im working on…  
[http://www.menosesmas.com.ve/rhema/calendario.php](http://www.menosesmas.com.ve/rhema/calendario.php)
