You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2020/09/26 19:10:33 UTC

[GitHub] [fineract] ptuomola commented on pull request #1179: FINERACT-826 Migrate to java.time from Joda API

ptuomola commented on pull request #1179:
URL: https://github.com/apache/fineract/pull/1179#issuecomment-699536224


   @vorburger I left some review comments but I'm assuming you can't see them as I've left the review in "pending" state. My bad.
   
   What I got stuck on was the handling for date formatting. Looks like java.time is stricter on date format strings: "dd MMM yyyy" that we use means the date has to have two digits i.e. leading zero for 1-9, whereas Joda accepted a single digit as well. The PR fixes this by changing every date in the tests to be 01 etc. But my concern was about the real clients out there calling the APIs: will this not break the API for all of them, as they have been sending dates without leading zeros? 
   
   The right solution of course would be to use the right date format "d M y" which accepts both leading zero and without. But the date format is a string that is sent by the client in some cases. And we have no control over what format strings they send...
   
   So I wasn't able to find a solution that we could use that would avoid breaking API clients. Any ideas would be very welcome...
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org