• 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: Joda-Time and NSTimestamp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Joda-Time and NSTimestamp


  • Subject: Re: Joda-Time and NSTimestamp
  • From: Denis Frolov <email@hidden>
  • Date: Thu, 11 Nov 2010 23:30:31 +0300

I usually do:

    	new DateTime(ts);
    	new NSTimestamp(dt.toDate());

Dennis

On Thu, Nov 11, 2010 at 7:39 PM, Ricardo J. Parada <email@hidden> wrote:
> Hi All,
>
> I'm enjoying using Joda Time classes in ERJars.  I seem to always manipulate dates more easily and naturally.  But once I come up with the compute joda DateTime I'm converting it to NSTimestamp as follows:
>
>        DateTime dt = new DateTime();
>
>        // Manipulate dt
>        dt = dt.plusHours(1);
>
>        // Convert back to NSTimestamp to store in EO property
>        NSTimestamp ts = new NSTimestamp(dt.getMillis());
>
> Is this the right way to do the conversion back to NSTimestamp?
>
> And how about NSTimestamp into a joda DateTime?  Is it
>
>        dt = new DateTime(ts.getTime());
>
> ?
>
> Thanks,
> Ricardo
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Joda-Time and NSTimestamp
      • From: "Ricardo J. Parada" <email@hidden>
References: 
 >Joda-Time and NSTimestamp (From: "Ricardo J. Parada" <email@hidden>)

  • Prev by Date: Re: How to display a non-attribute form field that's embedded in a WORepetition
  • Next by Date: Re: Joda-Time and NSTimestamp
  • Previous by thread: Joda-Time and NSTimestamp
  • Next by thread: Re: Joda-Time and NSTimestamp
  • Index(es):
    • Date
    • Thread