/* TitanicTimes.kt Copyright (c) Kari Laitinen http://www.naturalprogramming.com 2020-10-31 File created. */ import java.time.LocalDate import java.time.Period fun main() { val date_when_titanic_sank = LocalDate.of( 1912, 4, 15 ) val date_of_today = LocalDate.now() val time_from_sinking = date_when_titanic_sank.until( date_of_today ) print( "\n Today it is " + date_of_today + ".\n On " + date_when_titanic_sank + ", the famous ship \"Titanic\" went to" + "\n the bottom of Atlantic Ocean." + "\n That happened " + time_from_sinking.getYears() + " years, " + time_from_sinking.getMonths() + " months, and " + time_from_sinking.getDays() + " days ago. \n\n" ) }