Hi Artur,
I think I understand why you'd like to have Date and long support, but I 
deliberatley didn't add them.

For long, the reason is that I am trying to move users of Joda-Time to a 
world where objects are typed (Instant/Duration) rather than untyped 
(long). It also greatly reduces the number of methods that have to be 
coded in the API.

For Date, the reason is similar, however it is complicated by the fact 
that there are two valid ways to convert from a Date to a Joda-Time 
object. The first way uses the deprecated get methods on Date, and the 
second uses the millisecond long value. These can produce different 
results in certain edge cases (where timezone rules differ between the 
JDK and Joda-Time). As such, an API on Days that accepted a Date would 
need to choose which route to go down. Instead, you do that yourself, 
when you choose how to create the LocalDate/DateTime object.

Hope this answers the question, if not entirely helps!

Stephen


Artur wrote:
> Hi!
> 
> Is it possible to add support of Date and Long arguments to methods:
> 
> Days.daysBetween, Months.monthsBetween etc?
> 
> It'd be very useful. In many parts of my program I've to operate
> on standard java date time and I've to convert this types all the time.
> 
> 
> Have a nice day!
> Artur
> 
> p.s. Joda Time rules !!! :)
> 
> 
> 
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to