Print date

Report a typo

The function printDate(date: String) gets an ISO 8601 string representing a date (for example, 2000-01-01) as a parameter and prints the date in the following format: SATURDAY, JANUARY 1, 2000.

Write the correct code for the printDate() function.

This task uses dependencies that may not be available in your local IDE. As a result, you may see compilation errors or unresolved references when running the code locally. This does not affect solution validation when you submit your solution to Hyperskill.

Sample Input 1:

2000-01-01

Sample Output 1:

SATURDAY, JANUARY 1, 2000
Write a program in Kotlin
import kotlinx.datetime.*

fun printDate(date: String) {
// Write your code here

//
}

fun main() {
val date = readln()
printDate(date)
}

Create a free account to access the full topic