Is it possible in JodaTime to get day of week as a string having only integer number of a day of week without creation of DateTime object

Viewed 3695

I have a primitive int variable with possible values from 1 to 7 (actually it received from calling getDayOfWeek() on org.joda.time.DateTime object and then persisted).

Now I need to get a string representation of this day of week. I can do it by creating a new DateTime object and setting that day of week to created object:

LocalDateTime.now().withDayOfWeek(dayOfWeek).dayOfWeek().getAsText();

The question is: can I get the same string without redundant creation of a LocalDateTime object?

2 Answers
Related