• 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: Dave DeLong <email@hidden>
  • Date: Fri, 07 Sep 2012 16:57:20 -0700

Run @"j:mm" through +[NSDateFormatter dateFormatFromTemplate:options:locale:] and the strip the "a" character out of the resulting string.

Dave

Sent from Jane

On Sep 7, 2012, at 3:33 PM, Jens Alfke <email@hidden> wrote:

>
> On Sep 7, 2012, at 3:00 PM, Dennis <email@hidden> wrote:
>
>> How do you eliminate the am/pm? There does not appear to be a built-in date formatter style that does that.
>
> If you don’t use the built-in styles you can specify an exact format string. But I suppose then you’ve lost localizability. Hm. There may not be a foolproof way to do this — it may be that the best you can do is to look up the hour/minute separator string from the locale and format the time yourself.
>
> —Jens
> _______________________________________________
>
> 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

_______________________________________________

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: "Gary L. Wade" <email@hidden>
References: 
 >Formatting elapsed time (From: Dennis <email@hidden>)
 >Re: Formatting elapsed time (From: Jens Alfke <email@hidden>)
 >Re: Formatting elapsed time (From: Dennis <email@hidden>)
 >Re: Formatting elapsed time (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Formatting elapsed time
  • Next by Date: Re: Formatting elapsed time
  • Previous by thread: Re: Formatting elapsed time
  • Next by thread: Re: Formatting elapsed time
  • Index(es):
    • Date
    • Thread