# Columbus.py Copyright (c) Kari Laitinen # http://www.naturalprogramming.com # 2006-05-01 File created. # 2009-01-22 class ISODate used in place of Date # 2022-12-18 Converted to Python 3. # During compilation and execution, the file ISODate.py must be in # the same folder together with this program. from ISODate import ISODate from ISODate import DateDistance date_of_discovery_of_america = ISODate( 1492, 10, 12 ) date_of_first_moon_landing = ISODate( "1969-07-20" ) print( "\n Christopher Columbus discovered America on %s" \ "\n That was a %s" % ( date_of_discovery_of_america, date_of_discovery_of_america.get_day_of_week() ) ) print( "\n Apollo 11 landed on the moon on %s" \ "\n That was a %s" % ( date_of_first_moon_landing, date_of_first_moon_landing.get_day_of_week() ) ) distance_between = \ date_of_discovery_of_america.get_distance_to( date_of_first_moon_landing ) print( "\n America was discovered %d years, %d months, and %d days" \ "\n before the first moon landing.\n" % ( distance_between.years, distance_between.months, distance_between.days ) )