how to store a date, and then check to see if another date matches that date

Posted by user797963 on Stack Overflow See other posts from Stack Overflow or by user797963
Published on 2013-10-28T01:46:51Z Indexed on 2013/10/28 3:54 UTC
Read the original article Hit count: 118

Filed under:

I'm trying to figure out dates in Java and am completely lost. Do I use Date? Use epoch time? Gregorian Calendar?

Let's say I have a want to store a date, then later compare it to other dates. For example, I've stored a date "10/27/2013". Then, I want to later compare it to dates entered later to see if a later date is identical to "10/27/2013", or if just the day, year, or month matches? What's the best way to do this?

© Stack Overflow or respective owner

Related posts about java