Because the getXXX methods just return that FIELD of time. If you want the
computed time, you need the toStandardXXX method.
On Tue, Sep 30, 2008 at 9:41 AM, Elam Daly <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm trying this simple example to understand the Period class.
>
> Why does the getDays() method return 0, instead of 472?
>
> Thanks,
> - Elam
>
> DateTime start = new DateTime(2004, 12, 25, 0, 0, 0, 0);
> DateTime end = new DateTime(2006, 1, 1, 0, 0, 0, 0);
>
> // period of 1 year and 7 days
> Period period = new Period(start, end);
> System.out.println(period.getDays()); // Returns 0
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest