• 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: Dates (1-day resolution) redux
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dates (1-day resolution) redux


  • Subject: Re: Dates (1-day resolution) redux
  • From: Henrique Prange <email@hidden>
  • Date: Wed, 11 Aug 2010 15:01:43 -0300

Hi Paul,

Have you tried Joda Time LocalDate [1]?

"LocalDate is an immutable datetime class representing a date without a time zone."

You could create a custom type to map the DATE external type to the LocalDate class, instead of using NSTimestamp or java.util.Date. It is similar to the Boolean solution.

[1]http://joda-time.sourceforge.net/apidocs/org/joda/time/LocalDate.html

Cheers,

Henrique

On 11/08/2010, at 03:56, Paul Hoadley wrote:

> On 10/08/2010, at 11:33 PM, John Huss wrote:
>
>> On Tue, Aug 10, 2010 at 6:12 AM, Paul Hoadley <email@hidden> wrote:
>> For the attribute that we may as well call the "birthday" attribute, I'm using the "date" prototype from ERPrototypes.  Curiously (IMHO), this prototype has an external type of "TIMESTAMP", even though Postgres offers the 1-day-resolution "DATE" type.  In any case, I stuck with the prototype as shipped.
>>
>> I would consider that a bug in ERPrototypes, since there is a dateTime prototype, the date prototype only makes sense if it is different.  But fixing it is difficult since it could break everyone using it.  Even so, it wouldn't be the first time such a thing was done, and I am a proponent of getting things right, as long as the community is sufficiently notified.
>
> I wonder if it's incidental to the real problem, though, which is that EOF and Java have no 1-day-resolution date type.  That is, and I haven't tested it (though it's on my list), I'm not sure that using PostgreSQL's DATE type would actually solve the problem.
>
>
> --
> Paul.
>
> http://logicsquad.net/
>
>
> _______________________________________________
> 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: Dates (1-day resolution) redux
      • From: Paul Hoadley <email@hidden>
References: 
 >Dates (1-day resolution) redux (From: Paul Hoadley <email@hidden>)
 >Re: Dates (1-day resolution) redux (From: John Huss <email@hidden>)
 >Re: Dates (1-day resolution) redux (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: postNotification and editingContext().saveChanges() / editingContext().revert()
  • Next by Date: [WOWODC 2010] 3 days left for registration!
  • Previous by thread: Re: Dates (1-day resolution) redux
  • Next by thread: Re: Dates (1-day resolution) redux
  • Index(es):
    • Date
    • Thread