• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Formatting elapsed time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Formatting elapsed time


  • Subject: Re: Formatting elapsed time
  • From: Rick Mann <email@hidden>
  • Date: Fri, 07 Sep 2012 14:45:13 -0700

I've had to write my own code to do this. It's not at all hard, but gets tedious when you decide to expand relative times to things like "about an hour ago," "tomorrow," etc.

--
Rick

On Sep 7, 2012, at 11:37 , Dennis <email@hidden> wrote:

> I'm getting stuck trying to format a variable quantity of elapsed time for the user's locale. The NSDateFormatter class seems to only provide formats for actual times (e.g. "1:30 AM"). What I need to do is turn 1 hour and 30 minutes into "1:30" for my US English settings, and the appropriate string for other locales.
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


--
Rick




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Formatting elapsed time
      • From: Dennis <email@hidden>
References: 
 >Formatting elapsed time (From: Dennis <email@hidden>)

  • Prev by Date: Re: What is NSView's anchorPoint/origin/axis for setFrameCenterRotation?
  • Next by Date: Re: Malloc Error: pointer being freed was not allocated
  • Previous by thread: Formatting elapsed time
  • Next by thread: Re: Formatting elapsed time
  • Index(es):
    • Date
    • Thread