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

Date calculation


  • Subject: Date calculation
  • From: Randall Perry <email@hidden>
  • Date: Fri, 23 Apr 2004 09:54:30 -0400

Read through the archives to get tips on date calc. The consensus seems to
be to convert NSTimestamp to GregorianCalendar to get accuracy.

I need to find the date 1 year ago and tried this:

    NSTimestamp timestamp = new NSTimestamp();
    GregorianCalendar cal = new GregorianCalendar();
    cal.setTime(timestamp);
    cal.add( GregorianCalendar.DATE, -365);
    newtime = new NSTimestamp(cal.getTime());


But get a compiler error on line 3: 'identifier expected'

What's the problem?


--
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Date calculation
      • From: "Sako!" <email@hidden>
  • Prev by Date: Re: Using name and email address in WOMailDelivery
  • Next by Date: Re: D2W: QueryAllPage?
  • Previous by thread: Re: D2W: QueryAllPage?
  • Next by thread: Re: Date calculation
  • Index(es):
    • Date
    • Thread