Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
♻️ :: Diary padStart
Browse files Browse the repository at this point in the history
  • Loading branch information
chlgkdms committed Dec 5, 2023
1 parent dadb0e9 commit 0498eac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ internal fun Diary(
var dayState by remember { mutableStateOf(formatter.format(date).split("-").last()) }

LaunchedEffect("$yearState-$monthState-$dayState") {
diaryViewModel.setDate("$yearState-$monthState-$dayState")
diaryViewModel.setDate("$yearState-$monthState-${dayState.padStart(2, '0')}")
diaryViewModel.fetchDayDiary()
}

Expand Down

0 comments on commit 0498eac

Please sign in to comment.