If you want to know if the current date falls between two given points in time (9AM - 5PM on 7/1/09), use NSCalendar and NSDateComponents to build NSDate instances for the desired times and compare them with the current date.
If you want to know if the current date falls between these two hours every day, then you could probably go the other way. Create an NSDateComponents object with and NSCalendar and your NSDate and compare the hour components.
For the first part, use the answer from @kperryua to construct the NSDate objects you want to compare with. From your answer to your own question, it sounds like you have that figured out.
For actually comparing the dates, I totally agree with @Tim's comment on your answer. It's more concise yet actually exactly equivalent to your code, and I'll explain why.
Although it may seem that the return statement must evaluate both operands of the && operator, this is actually not the case. The key is "short-circuit evaluation", which is implemented in a wide variety of programming languages, and certainly in C. Basically, the operators & and &&0 "short circuit" if the first argument is 0 (or NO, nil, etc.), while &&1 and &&2 do the same if the first argument is &&3 0. If date comes before beginDate, the test returns NO without even needing to compare with endDate. Basically, it does the same thing as your code, but in a single statement on one line, not 5 (or 7, with whitespace).
This is intended as constructive input, since when programmers understand the way their particular programming language evaluates logical expressions, they can construct them more effectively without so much about efficiency. However, there are similar tests that would be less efficient, since not all operators short-circuit. (Indeed, most cannot short-circuit, such as numerical comparison operators.) When in doubt, it's always safe to be explicit in breaking apart your logic, but code can be much more readable when you let the language/compiler handle the little things for you.
With Swift 5, you can use one of the two solutions below in order to check if a date occurs between two other dates.
#1. Using DateInterval's contains(_:) method
DateInterval has a method called contains(_:). contains(_:) has the following declaration:
func contains(_ date: Date) -> Bool
Indicates whether this interval contains the given date.
The following Playground code shows how to use contains(_:) in order to check if a date occurs between two other dates:
import Foundation
let calendar = Calendar.current
let startDate = calendar.date(from: DateComponents(year: 2010, month: 11, day: 22))!
let endDate = calendar.date(from: DateComponents(year: 2015, month: 5, day: 1))!
let myDate = calendar.date(from: DateComponents(year: 2012, month: 8, day: 15))!
let dateInterval = DateInterval(start: startDate, end: endDate)
let result = dateInterval.contains(myDate)
print(result) // prints: true
#2. Using ClosedRange's contains(_:) method
ClosedRange has a method called contains(_:). contains(_:) has the following declaration:
func contains(_ element: Bound) -> Bool
Returns a Boolean value indicating whether the given element is contained within the range.
The following Playground code shows how to use contains(_:) in order to check if a date occurs between two other dates:
import Foundation
let calendar = Calendar.current
let startDate = calendar.date(from: DateComponents(year: 2010, month: 11, day: 22))!
let endDate = calendar.date(from: DateComponents(year: 2015, month: 5, day: 1))!
let myDate = calendar.date(from: DateComponents(year: 2012, month: 8, day: 15))!
let range = startDate ... endDate
let result = range.contains(myDate)
//let result = range ~= myDate // also works
print(result) // prints: true