I have 2 DATES.
- End Date
- Current Date Now, I want to find NSTimeInterval and Calculate remaining time in Days, Hours, Minutes, Seconds. I do not want to use NSDateComponents. I want some formula that calculate that gives remaining time in Days, Hours, Minutes, Seconds.
I tried this below formula but that formula gives remaining Hours, Minutes, Seconds.
But how do I calculate this Days, Hours, Minutes, Seconds ??
I'm using this below code
@property (nonatomic, assign) NSTimeInterval secondsLeft;
_hours = (int)self.secondsLeft / 3600;
_minutes = ((int)self.secondsLeft % 3600) / 60;
_seconds = ((int)self.secondsLeft %3600) % 60;