Enum을 이용한 Date 포맷
import java.time.LocalDate; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Date; /** * This pattern has the following benefits: * * - Date formats are referenced as a strong type * - Code completion on patterns * - Patterns can be javadoc'ed */ public enum Dates { /** * Format: yyyy-MM-dd * Example: 2022-03-30 */ yyyy_MM_dd("yyyy-MM-dd"), /** * Format: MMM d..
Java
2022. 3. 13. 14:21