Created
August 3, 2022 04:27
-
-
Save NahianAhmed/488bd31a471517d9180a7b9c7a52d387 to your computer and use it in GitHub Desktop.
1st day of week in java LocalDateTime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DayOfWeek dayOfWeek = WeekFields.of(Locale.getDefault()).getFirstDayOfWeek(); | |
LocalDateTime firstDayOfWeek = LocalDate.now().atTime(0, 0, 0).with(TemporalAdjusters.previousOrSame(dayOfWeek)) | |
.with(LocalTime.MIN); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment