Java 8 Date/Time API Extension Methods

Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
123
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Java 8 Date/Time API Extension Methods

Joe Wolf
Hi, I want to announce the 1.0 release of an OSS project I've been working on called goodtimes. 

The Groovy JDK has always been one of my favorite parts of Groovy, but it currently lacks support for newer Java 8 classes. Goodtimes fills some of this gap until the GDK is updated by providing extension methods for the Java 8 Date/Time API akin to those available for java.util.Date and Calendar.

Source and documentation are hosted on GitHub: https://github.com/bdkosher/goodtimes

Just add the dependency to your classpath to give it a try (assuming you're on Java 8, of course).

@Grab('com.github.bdkosher:goodtimes:1.0')

compile 'com.github.bdkosher:goodtimes:1.0' 

-Joe
@bdkosher
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 8 Date/Time API Extension Methods

sbglasius
Well done! Thank you for sharing!

/Søren

On Sat, 6 May 2017 at 22:30 Joe Wolf <[hidden email]> wrote:
Hi, I want to announce the 1.0 release of an OSS project I've been working on called goodtimes. 

The Groovy JDK has always been one of my favorite parts of Groovy, but it currently lacks support for newer Java 8 classes. Goodtimes fills some of this gap until the GDK is updated by providing extension methods for the Java 8 Date/Time API akin to those available for java.util.Date and Calendar.

Source and documentation are hosted on GitHub: https://github.com/bdkosher/goodtimes

Just add the dependency to your classpath to give it a try (assuming you're on Java 8, of course).

@Grab('com.github.bdkosher:goodtimes:1.0')

compile 'com.github.bdkosher:goodtimes:1.0' 

-Joe
@bdkosher
--
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 8 Date/Time API Extension Methods

Guillaume Laforge
Administrator
This is indeed cool, and I'm wondering if it shouldn't be part of Groovy itself directly :-)

On Sun, May 7, 2017 at 10:09 PM, Søren Berg Glasius <[hidden email]> wrote:
Well done! Thank you for sharing!

/Søren


On Sat, 6 May 2017 at 22:30 Joe Wolf <[hidden email]> wrote:
Hi, I want to announce the 1.0 release of an OSS project I've been working on called goodtimes. 

The Groovy JDK has always been one of my favorite parts of Groovy, but it currently lacks support for newer Java 8 classes. Goodtimes fills some of this gap until the GDK is updated by providing extension methods for the Java 8 Date/Time API akin to those available for java.util.Date and Calendar.

Source and documentation are hosted on GitHub: https://github.com/bdkosher/goodtimes

Just add the dependency to your classpath to give it a try (assuming you're on Java 8, of course).

@Grab('com.github.bdkosher:goodtimes:1.0')

compile 'com.github.bdkosher:goodtimes:1.0' 

-Joe
@bdkosher
--
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: <a href="tel:+45%2040%2044%2091%2088" value="+4540449188" target="_blank">+45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.



--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 8 Date/Time API Extension Methods

Joe Wolf
Thanks Søren and Guillaume. I'm glad to finally contribute something to the Groovy community!

On Sun, May 7, 2017 at 4:14 PM, Guillaume Laforge <[hidden email]> wrote:
This is indeed cool, and I'm wondering if it shouldn't be part of Groovy itself directly :-)

On Sun, May 7, 2017 at 10:09 PM, Søren Berg Glasius <[hidden email]> wrote:
Well done! Thank you for sharing!

/Søren


On Sat, 6 May 2017 at 22:30 Joe Wolf <[hidden email]> wrote:
Hi, I want to announce the 1.0 release of an OSS project I've been working on called goodtimes. 

The Groovy JDK has always been one of my favorite parts of Groovy, but it currently lacks support for newer Java 8 classes. Goodtimes fills some of this gap until the GDK is updated by providing extension methods for the Java 8 Date/Time API akin to those available for java.util.Date and Calendar.

Source and documentation are hosted on GitHub: https://github.com/bdkosher/goodtimes

Just add the dependency to your classpath to give it a try (assuming you're on Java 8, of course).

@Grab('com.github.bdkosher:goodtimes:1.0')

compile 'com.github.bdkosher:goodtimes:1.0' 

-Joe
@bdkosher
--
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: <a href="tel:+45%2040%2044%2091%2088" value="+4540449188" target="_blank">+45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.



--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 8 Date/Time API Extension Methods

Guillaume Laforge
Administrator
I'm coming back on this idea of having it directly integrated in Groovy core.

Any more thoughts on this from anyone?

On Tue, May 9, 2017 at 3:32 AM, Joe Wolf <[hidden email]> wrote:
Thanks Søren and Guillaume. I'm glad to finally contribute something to the Groovy community!

On Sun, May 7, 2017 at 4:14 PM, Guillaume Laforge <[hidden email]> wrote:
This is indeed cool, and I'm wondering if it shouldn't be part of Groovy itself directly :-)

On Sun, May 7, 2017 at 10:09 PM, Søren Berg Glasius <[hidden email]> wrote:
Well done! Thank you for sharing!

/Søren


On Sat, 6 May 2017 at 22:30 Joe Wolf <[hidden email]> wrote:
Hi, I want to announce the 1.0 release of an OSS project I've been working on called goodtimes. 

The Groovy JDK has always been one of my favorite parts of Groovy, but it currently lacks support for newer Java 8 classes. Goodtimes fills some of this gap until the GDK is updated by providing extension methods for the Java 8 Date/Time API akin to those available for java.util.Date and Calendar.

Source and documentation are hosted on GitHub: https://github.com/bdkosher/goodtimes

Just add the dependency to your classpath to give it a try (assuming you're on Java 8, of course).

@Grab('com.github.bdkosher:goodtimes:1.0')

compile 'com.github.bdkosher:goodtimes:1.0' 

-Joe
@bdkosher
--
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: <a href="tel:+45%2040%2044%2091%2088" value="+4540449188" target="_blank">+45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.



--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform





--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 8 Date/Time API Extension Methods

sbglasius
I think it makes perfect sense that you can do the same calculations with java.time.* as you can with java.util.Date 

/Søren

On Wed, 7 Jun 2017 at 16:08 Guillaume Laforge <[hidden email]> wrote:
I'm coming back on this idea of having it directly integrated in Groovy core.

Any more thoughts on this from anyone?

On Tue, May 9, 2017 at 3:32 AM, Joe Wolf <[hidden email]> wrote:
Thanks Søren and Guillaume. I'm glad to finally contribute something to the Groovy community!

On Sun, May 7, 2017 at 4:14 PM, Guillaume Laforge <[hidden email]> wrote:
This is indeed cool, and I'm wondering if it shouldn't be part of Groovy itself directly :-)

On Sun, May 7, 2017 at 10:09 PM, Søren Berg Glasius <[hidden email]> wrote:
Well done! Thank you for sharing!

/Søren


On Sat, 6 May 2017 at 22:30 Joe Wolf <[hidden email]> wrote:
Hi, I want to announce the 1.0 release of an OSS project I've been working on called goodtimes. 

The Groovy JDK has always been one of my favorite parts of Groovy, but it currently lacks support for newer Java 8 classes. Goodtimes fills some of this gap until the GDK is updated by providing extension methods for the Java 8 Date/Time API akin to those available for java.util.Date and Calendar.

Source and documentation are hosted on GitHub: https://github.com/bdkosher/goodtimes

Just add the dependency to your classpath to give it a try (assuming you're on Java 8, of course).

@Grab('com.github.bdkosher:goodtimes:1.0')

compile 'com.github.bdkosher:goodtimes:1.0' 

-Joe
@bdkosher
--
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: <a href="tel:+45%2040%2044%2091%2088" value="+4540449188" target="_blank">+45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.



--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform





--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

--
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 8 Date/Time API Extension Methods

Russel Winder-3
On Wed, 2017-06-07 at 14:38 +0000, Søren Berg Glasius wrote:
> I think it makes perfect sense that you can do the same calculations
> with
> java.time.* as you can with java.util.Date
>

Shouldn't it be fair to assume that all new code eschews java.util.Date
and all the Calendar stuff, and uses java.time for everything time and
date related?

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 8 Date/Time API Extension Methods

Dinko Srkoč
On 8 June 2017 at 13:09, Russel Winder <[hidden email]> wrote:
> On Wed, 2017-06-07 at 14:38 +0000, Søren Berg Glasius wrote:
>> I think it makes perfect sense that you can do the same calculations
>> with
>> java.time.* as you can with java.util.Date
>>
>
> Shouldn't it be fair to assume that all new code eschews java.util.Date
> and all the Calendar stuff, and uses java.time for everything time and
> date related?

I think this falls into a category of "hope" or "wish", rather than
"assumption" :-)

Cheers,
Dinko

>
> --
> Russel.
> =============================================================================
> Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 8 Date/Time API Extension Methods

Russel Winder-3
On Thu, 2017-06-08 at 13:18 +0200, Dinko Srkoč wrote:

> On 8 June 2017 at 13:09, Russel Winder <[hidden email]> wrote:
> > On Wed, 2017-06-07 at 14:38 +0000, Søren Berg Glasius wrote:
> > > I think it makes perfect sense that you can do the same
> > > calculations
> > > with
> > > java.time.* as you can with java.util.Date
> > >
> >
> > Shouldn't it be fair to assume that all new code eschews
> > java.util.Date
> > and all the Calendar stuff, and uses java.time for everything time
> > and
> > date related?
>
> I think this falls into a category of "hope" or "wish", rather than
> "assumption" :-)
True, but I was hoping that unlike a large percentage of Java
developers who are hugely reluctant to learn anything new they do not
already know (*), Groovy developers were very much into using the best
new idiomatic ways of doing things (well except for stuff that is just
fashionably trendy for a few days) and keeping their codebases up to
date with up-to-date Groovy.

Please do not shatter my illusions.



(*) And are thus part of the legacy problem.

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 8 Date/Time API Extension Methods

Daniel Sun
In reply to this post by Joe Wolf
Hi Joe,
     
      Thanks for your awesome work. I like it.

Cheers,
Daniel.Sun
123
Loading...