Today I encountered a little problem wich I had to solve with dates. I had to check, if today has a special event. The range is stored in a simple date format: YYYY.MM.DD-YYYY.MM.DD
Here is the solution:
The "getTime()" method will create a timestamp from the created date. It's like a date in a number format wich can be easily compared to eachother.