Skip to content

Commit

Permalink
♻️ :: 시간 파싱
Browse files Browse the repository at this point in the history
  • Loading branch information
parkuiery committed Jun 4, 2024
1 parent 7b68ee0 commit fd48833
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.ramcosta.composedestinations.annotation.Destination
import org.threeten.bp.LocalDateTime
import team.aliens.dms.android.core.designsystem.Scaffold
import team.aliens.dms.android.core.designsystem.DmsTheme
import team.aliens.dms.android.core.designsystem.DmsTopAppBar
Expand Down Expand Up @@ -88,7 +89,7 @@ internal fun NoticeDetailsScreen(
modifier = Modifier
.fillMaxWidth()
.horizontalPadding(),
text = uiState.createdAt.toString(),
text = uiState.createdAt.text,
style = DmsTheme.typography.caption,
color = DmsTheme.colorScheme.onSurfaceVariant,
)
Expand Down Expand Up @@ -125,3 +126,7 @@ internal fun NoticeDetailsScreen(
}
}
}

private val LocalDateTime?.text: String
@Composable inline get() = "${this?.year}-${this?.monthValue}-${this?.dayOfMonth} ${this?.hour}:${this?.minute}"

0 comments on commit fd48833

Please sign in to comment.