Simple Question, but Google surprisingly had little on this. I have the number of days from Jan 1st of the year. How can I convert that to a date i
If you are Android developer and using JodaTime this is how you get equivalent of this in java 8.
LocalDate.ofYearDay("2020", 255).getDayOfWeek().getValue()
Use this because ofYearDay is only supported above Android >= 26;
MutableDateTime mutableDateTime1 = new MutableDateTime();
mutableDateTime1.setYear("2020");
mutableDateTime1.setDayOfYear(255);
LocalDate.fromDateFields(mutableDateTime1.toDate()).getDayOfWeek();