NSDateFormatter Styles - x days x hours x minutes x seconds?

Discussion in 'iOS Programming' started by CaptainZap, Sep 7, 2008.

  1. CaptainZap macrumors regular

    Joined:
    Jan 17, 2007
    #1
    I've been reading through the documentation trying to find something that produces a string like this from two NSDates: "5 days 3 hours 52 minutes and 34 seconds". So far I haven't found anything and am just wondering if I missed something or if I'll have to do this the hard way.

    Thanks
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Look at the documentation more carefully. The setDateFormat: method allows you to set any format you like.
     
  3. CaptainZap thread starter macrumors regular

    Joined:
    Jan 17, 2007
    #3
    K thanks, for some reason I was stuck on the -setDateStyle method and knew none of those fit what I was looking for.
     

Share This Page