You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Peter Minearo (JIRA)" <ji...@apache.org> on 2019/03/07 22:26:00 UTC

[jira] [Created] (LANG-1438) Enhancement of DateUtils, or new DateTimeUtility

Peter Minearo created LANG-1438:
-----------------------------------

             Summary: Enhancement of DateUtils, or new DateTimeUtility
                 Key: LANG-1438
                 URL: https://issues.apache.org/jira/browse/LANG-1438
             Project: Commons Lang
          Issue Type: Improvement
          Components: lang.time.*
            Reporter: Peter Minearo
         Attachments: DateTimeUtility.java

My company deals with dates quite a bit and we came up with our own DateTimeUtility which has a LOT of functionality in terms of conversions, calculations, and parsing.  I looked at DateUtils and it did not have everything we needed. Hence, the reason we built our own.  And, I do believe that what we have built is of interest to other developers.

 

There is functionality in converting between ZonedDateTime, LocalDateTime, LocalDate, Timestamp, and Date.  The reason for the conversions is to centralize where Date and Timestamp are referenced to make it easier to get rid of once the JDBC Drivers catch up with the new java.time api.  It also helped us in converting all of our code base over to java.time.

 

There is functionality to calculate certain standard times like: getStartOfDay() or getEndOfDay().  

 

And there is a lot of parsing logic which I know DateUtils has.  However, we set up the common formats we use in the app.  Again, we made it easier for ourselves by centralizing our formats. This part of our utility I am not expecting DateUtils to absorb; but I am hoping the functionality mentioned above is of some interest.

 

I thought it would be a good idea to incorporate some of the functionality we have into Apache Commons Lang.  This may be its own class, or part of DateUtils. I would be happy to help with the integration if you would like.  But would want some direction from the Commons Lang developers.  


Also, I have included a copy of the class for you to review.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)