Ada Calendar Arithmetic Difference 0 day between March 27 and March 28 2011

73 Views Asked by At

Why do I have the value 0 days between March 27, 2011 and March 28, 2011?

with Ada.Calendar;            use Ada.Calendar;
with Ada.Calendar.Arithmetic; use Ada.Calendar.Arithmetic;
with Ada.Text_IO;             use Ada.Text_IO;
procedure main is
   t0 : Time      := Time_Of (Year => 2_011, Month => 3, Day => 27);
   t1 : Time      := Time_Of (Year => 2_011, Month => 3, Day => 28);
   da : Day_Count := t1 - t0;
begin
   Put_Line (da'Img);
end main;
[...]\obj\main.exe
 0

I wanted to get 1 day...

0

There are 0 best solutions below