[threeten-dev] [threeten-develop] Integration with other JDK classes
Nikolay Metchev
nikolaymetchev at gmail.com
Wed Dec 5 07:14:40 PST 2012
On a related note should the java.text.DateFormat class and subclasses be
modified as well? If not should it be marked as deprecated?
On 5 December 2012 14:46, Stephen Colebourne <scolebourne at joda.org> wrote:
> The question is to what degree should existing JDK date/time classes
> support integration with 310?
> Key open question to everyone is how much integration should be done?
>
> Here is my list and proposls:
> util.Date - implement DateTimeAccessor (INSTANT_SECONDS and fractional
> second fields)
> sql.Date - implement DateTimeAccessor (EPOCH_DAY and related)
> sql.Time - implement DateTimeAccessor (NANO_OF_DAY and related)
> sql.Timestamp - implement DateTimeAccessor (all ChronoField)
> Calendar - implement DateTimeAccessor (all ChronoField)
> GregorianCalendar - implement DateTimeAccessor (all ChronoField and zone)
> FileTime should implement DateTimeAccessor
> xml.XMLGregorianCalendar should implement DateTimeAccessor
> xml.Duration should implement PlusAdjuster and MinusAdjuster
> TimeUnit should implement PeriodUnit
>
> In addition, some common additional methods would be very helpful:
> Date.toInstant()
> util.Date.from(DateTimeAccessor)
> sql.Date.from(DateTimeAccessor)
> sql.Time.from(DateTimeAccessor)
> sql.Timestamp.from(DateTimeAccessor)
> Calendar.toInstant()
> Calendar.from(DateTimeAccessor)
> GregorianCalendar.toZonedDateTime()
> GregorianCalendar.from(DateTimeAccessor)
>
> GregorianCalendar might beneft from toLocalDate() and toLocalTime().
>
> The sql subtypes of util.Date are of course troublesome. The JDBC
> group need to advise on whether they consider them effectively
> deprecated or not.
>
> DAYS in TimeUnit will be different to DAYS in ChronoUnit as it is
> exactly 24 hours.
>
> I think that is all the JDK date/time classes. I could be wrong...
>
> Stephen
> (This was a private discussion being made public)
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> threeten-develop mailing list
> threeten-develop at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/threeten-develop
>
More information about the threeten-dev
mailing list