datetime-fortran

Fortran library for time and date manipulation operations.

brewmacoslinux
Try with needOr install directly
Source

About

Fortran time and date manipulation library

Examples

parse and work with dates and times in fortran code$ use datetime_module; type(datetime) :: dt; dt = datetime(2024, 1, 15, 10, 30, 0)
calculate time difference between two dates$ use datetime_module; type(timedelta) :: diff; diff = dt2 - dt1; print *, diff%total_seconds()
convert unix timestamp to readable date format$ use datetime_module; type(datetime) :: dt; dt = datetime_from_timestamp(1705315800); print *, dt%isoformat()
add days or hours to a date in fortran$ use datetime_module; dt_new = dt + timedelta(days=7, hours=3)
get current date and time in fortran program$ use datetime_module; type(datetime) :: now; now = datetime_now()