kotlin localdate

import java.time.LocalDate
import java.time.format.DateTimeFormatter

fun main() {
    // Step 1: Get the current date
    val currentDate: LocalDate = LocalDate.now()

    // Step 2: Format the current date as a string
    val formattedDate: String = currentDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))

    // Step 3: Print the formatted date
    println("Formatted Date: $formattedDate")
}