0

I'm doing a calendar / organizer in java

This calendar / organizer features as inputs Event setup time Date / Time of event begins Date / Time Event finish

I can not mark two events in the same period.

Solved this problem by consulting this link How can I determine if a date is between two dates in Java?

My doubts on how to determine date with setup time and date / time of the event beginning.

What I need is a date start (12/12/12 00:00:00) subtracting time setup (00/00/01 00:00:00) have this (12/12/11 00:00:00) **sorry my bad english

Community
  • 1
  • 1
Eduardo
  • 97
  • 1
  • 9
  • Just to confuse a little more, you could consider something like [this](http://stackoverflow.com/questions/20677541/date-range-in-date-range/20678485#20678485) – MadProgrammer Jan 28 '15 at 03:00
  • Really the question was too confusing. What I need is from a date (12/12/12 00:00:00) by subtracting (00/00/01 00:00:00) have this (12/12/11 00:00:00) Thanks for the link, I will search it – Eduardo Jan 28 '15 at 03:17
  • 1
    Do you want to substract 1 from the day? – Jens Jan 28 '15 at 06:30
  • Search StackOverflow for hundreds of examples of adding and subtracting date-time values. Search for "Java date add" or "Java date subtract". Bonus tip: focus on answers with "Joda" or "java.time". – Basil Bourque Jan 29 '15 at 18:28

1 Answers1

0

You can use java.util.Date.getTime() to find a long representation of date and then do a simple comparison or arithematic.

Maverik
  • 47
  • 4