• 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: NSDate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDate


  • Subject: Re: NSDate
  • From: Laurent Daudelin <email@hidden>
  • Date: Thu, 05 Feb 2004 01:01:39 -0500

on 05/02/04 00:39, April Gendill at email@hidden wrote:

> Is it possible to take a string such as 2/04/04 and compare it to an
> NSDate object?
>
> so far I simply cannot seem to get the string into something that would
> allow me to compare or sort or anything.
>

NSCalendarDate *firstDate = [NSCalendarDate dateWithString:aString
calendarFormat:[[NSUserDefaults standardUserDefaults]
objectForKey:NSShortDateFormatString]];

if ([firstDate earlierDate:secondDate] == firstDate)
[self doSomething];

-Laurent.
--
============================================================================
Laurent Daudelin AIM/iChat: LaurentDaudelin <http://nemesys.dyndns.org>
Logiciels Nemesys Software mailto:email@hidden

coaster n.: 1. Unuseable CD produced during failed attempt at writing to
writeable or re-writeable CD media. Certainly related to the coaster-like
shape of a CD, and the relative value of these failures. "I made a lot of
coasters before I got a good CD." 2. Useless CDs received in the mail from
the likes of AOL, MSN, CI$, Prodigy, ad nauseam.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSDate
      • From: Scott Anguish <email@hidden>
References: 
 >NSDate (From: April Gendill <email@hidden>)

  • Prev by Date: Re: NSDate
  • Next by Date: Re: NSDate
  • Previous by thread: Re: NSDate
  • Next by thread: Re: NSDate
  • Index(es):
    • Date
    • Thread