Logo

Programming-Idioms

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

Idiom #61 Get current date

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

integer, dimension(8) :: d

call date_and_time (values=d)

date_and_time is a standard subroutine.
with Ada.Calendar;
D : Ada.Calendar.Time := Ada.Calendar.Clock;

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