This should what you want, or at least close to it.
Code:
program:
# Calculate number of seconds in a day
one_day = 60 * 60 * 24;
# Calculate total seconds for days of loan
loan_seconds = one_day * $#diasadevolver;
# Get the start date in ISO format
start_day = $$#fechaprestamo;
# Get the "timestamp" for the start date -- number of seconds since epoch
start_ts = format_date(start_day, 'to_number');
# Add the number of seconds for the days of loan
end_ts = start_ts + loan_seconds;
# Convert the timestamp back into a datte
end_ts = format_date(start_ts, 'from_number');
# Format the date as desired
end_day = format_date(end_ts, 'yyyy MM dd')