Initialize a NSDate object with a specific time
<p>I have time in string format for example 2:00.I want to initialize it to NSDate with present date.
I tried doing</p>

<pre><code>   NSDateComponents *comps = [[NSDateComponents alloc] init];
   [comps setHour:2];
</code></pre>

<p>I am not able to compare this with a date object.Please help</p>
