Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Pascal

Idiom #115 Compare dates

Set boolean b to true if date d1 is strictly before date d2 ; false otherwise.

uses dateutils;
b := (CompareDateTime(d1,d2) = -1);
bool b = d1 < d2;

New implementation...
< >
programming-idioms.org