Logo

Programming-Idioms

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

Idiom #115 Compare dates

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

import Data.Time.Calendar
b = d1 < d2

d1 and d2 are of type Data.Time.Calendar.Day
bool b = d1 < d2;

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