Logo

Programming-Idioms

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

Idiom #115 Compare dates

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

bool b = d1 < d2;
import std.datetime;
bool b = d1 < d2;

d1, d2 have type Date.

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