[threeten-dev] j.u.Date/Calendrical/GregorianCalendar
Masayoshi Okutsu
masayoshi.okutsu at oracle.com
Fri Dec 7 06:47:06 PST 2012
On 12/7/2012 9:48 PM, Stephen Colebourne wrote:
> On 7 December 2012 05:40, Masayoshi Okutsu <masayoshi.okutsu at oracle.com> wrote:
>>> This would probably require reflection to implement, so isn't really
>>> ideal.
>> I thought it'd be a piece of cake to implement it with
>> DateTimeBuilder.build(Class), but it wasn't.
> I'd still like DateTimeBuilder to go away. So I wouldn't rely on that.
Yep. It's poorly designed and implemented..
>
>> I had to take a look at the
>> "real documentation" to determine what fields need to be set to produce an
>> instance of the given class...
>>> I think toInstant() and toZoneDateTime() cover most cases.
>>
>> But a Calendar isn't always a GregorianCalendar.
> I was proposing toZoneDateTime() on GregorianCalendar only.
It's not an acceptable solution to support only GregorianCalendar.
Masayoshi
More information about the threeten-dev
mailing list