Logo

Programming-Idioms

  • Groovy
  • Pascal
  • Scheme
  • Ada
  • Vb

Idiom #61 Get current date

Assign to the variable d the current date/time value, in the most standard type.

Dim d As DateTime = DateTime.Now()
var
  _d: TDateTime;
begin
  _d := Now;
end.
with Ada.Calendar;
D : Ada.Calendar.Time := Ada.Calendar.Clock;
#include <time.h>
time_t d=time(0);

Unix Timestamp

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