NSDate/ NSTimeZone Help


i trying set email picker have subject of message "tonight", "tomorrow","today", or defaults "later"

have far. how can tonight , today show?

code:
                int timezonedifference;         nsdate *tomorrowsdate = [nsdate datetomorrow];          nstimezone* timezone = [nstimezone systemtimezone];          timezonedifference = [timezone secondsfromgmt];          nsdate *startdate = [ _event.startdate datebyaddingtimeinterval:timezonedifference];          if ([startdate isequaltodateignoringtime:tomorrowsdate])           {              nslog(@"title tomorrow");              [controller setsubject:[nsstring stringwithformat:@"tomorrow - %@", _event.name]];          }          else if (startdate.hour > timezonedifference) {              nslog(@"title today");              [controller setsubject:[nsstring stringwithformat:@"today - %@", _event.name]];          }          else if (startdate.hour <= timezonedifference) {              nslog(@"title tonight");              [controller setsubject:[nsstring stringwithformat:@"tonight - %@", _event.name]];          }          else {              nslog(@"title later");              [controller setsubject:[nsstring stringwithformat:@" - %@", _event.name]];          }  
 



Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Rogue - the old text based game. I can't find it!

RAID in Early 2009 Mac Pro

NBC Releases Summer Olympics iOS Apps, Offering Livestreaming of All 302 Events