Start of week for locale using Joda-Time

后端 未结 7 2161
旧时难觅i
旧时难觅i 2020-11-28 10:20

How do you determine which day of the week is considered the “start” according to a given Locale using Joda-Time?

Point: Most countries use the international standard

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-28 11:01

    So your question is, how to get the DayOfWeek from a Joda DateTime object? What about this:

    DateTime dt = new DateTime().withYear(2009).plusDays(111);
    dt.toGregorianCalendar().getFirstDayOfWeek();
    

提交回复
热议问题