📜  从 localdate java 代码示例中获取周数

📅  最后修改于: 2022-03-11 14:52:29.934000             🧑  作者: Mango

代码示例2
LocalDate date = ...;
// Or use a specific locale, or configure your own rules
WeekFields weekFields = WeekFields.of(Locale.getDefault()); 
int weekNumber = date.get(weekFields.weekOfWeekBasedYear());