Skip to content

Instantly share code, notes, and snippets.

@jl2
Created July 20, 2012 23:59
Show Gist options
  • Save jl2/3153933 to your computer and use it in GitHub Desktop.
Save jl2/3153933 to your computer and use it in GitHub Desktop.
Calculate the approximate number of days till Arapahoe Basin opens
-- Calculate the approximate number of days till Arapahoe Basin opens
with Ada.Text_Io;
use Ada.Text_Io;
with Ada.Calendar;
use Ada.Calendar;
procedure dts is
tod : Time := Clock;
OpeningDay : Time := Time_Of(Day=>25,
Month=>10,
Year=>Year(Tod));
NumDays : Integer := Integer((Openingday - Tod) / Day_Duration'Last);
begin
Ada.Text_Io.Put_Line("There are" & Integer'Image(numdays) & " days till ski season.");
end dts;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment