[threeten-dev] Month methods

Stephen Colebourne scolebourne at joda.org
Wed Jun 5 03:13:24 PDT 2013


Adding the now() methods would need 3 extra methods on each of Month
and DayOfWeek. 6 extra methods.

The format() method is alreday handled by getDisplayName().

Stephen


On 5 June 2013 01:34, Janario Oliveira <janarioliver at gmail.com> wrote:
> Hi guys!
>
> I was looking the api and an interesting thing called my attention
>
> The Month(enum) doesn't have the same methods found in others classes like
> LocalDate, LocalDateTime and almost every mainly classes I've seen
>
> The methods are now() and format(DateTimeFormatter formatter)
>
> Without these I should do something like:
> Month currentMonth = LocalDate.now().getMonth();
>
> //It's ok but different from the way I
> prefer(LocalDate.format(DateTimeFormatter formatter))
> private static final DateTimeFormatter
> MY_MONTH_FORMATTER=DateTimeFormatter.ofPattern("MMM");
> MY_MONTH_FORMATTER.format(currentMonth)
>
> Is it possible to provide these methods?
> They would be much more useful once other classes have this standard
>
> Thanks
> Janario Oliveira


More information about the threeten-dev mailing list