NSCalendar ??

Discussion in 'iPhone/iPad Programming' started by sujithkrishnan, Aug 25, 2008.

  1. macrumors 6502

    Joined:
    May 9, 2008
    Location:
    Bangalore
    #1
    Hi

    In my app, i want to do a specific task on tuesday on app startup.
    If the app not opened on tuesday, i want the action to perform on the day which user opens the app.

    I tried making use of NSCalendar, but not much helpful... How to get the Date of last Tuesday if i on a later day ??

    I think i want to make use of "dateByAddingComponents" with some negative values....

    i found the NSCalendarDate can help me out, But it is not in iPhone Library... i think (as per API ref)
     
  2. macrumors member

    davedelong

    Joined:
    Sep 9, 2007
    Location:
    Right here.
    #2
    The NSDate class is available on iPhone. That should have the functionality you're looking for.

    HTH,

    Dave
     

Share This Page