At least you're using one if statement. Many do interval overlap comparisons with two if statements.
Reply on news.ycombinator.com