You are right, there is no easy method for this at present.

JSR-310/ThreeTen currently has a lengthInDays() method on the
equivalent class. Feel free to fork GitHub, add a method with that
name with tests, and make a pull request.

Stephen


On 24 April 2012 16:14, fed <res...@gmail.com> wrote:
> Hi,
>
> i was looking on javadoc but i found nothing, there is some way to get
> the number (as int) of the last day in a month from a YearMonth
> object?
>
> for example january -> 31, april -> 30 etc.
>
> For now i am creating an object rappresenting the first day of the
> month and then i use dayOfMonth().getMaximumValue(), but maybe there
> is something that can
> i use directly from YearMonth.
>
> Thanks
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to