Does MacPorts keep a log for actions like install and upgrade?
I will be semi helpful here. I can show you where the data is and an SQL query but you might need more for a clean solution.
Macports keeps a registry in an SQLite database in /opt/local/var/macports/registry/registry.db This includes a date which looks like to me the time the package was last installed on your machine
An SQL query returns the data
SELECT
  ports.name, 
  datetime(ports.date, 'unixepoch')
FROM
  ports
ORDER BY
  ports.date

You will need to modify the query for your exact use case to only show a subset (e.g. add a where clause) and something to run it in
A crude way to do this is use sqlite3.
sqlite3 /opt/local/var/macports/registry/registry.db

Then you get a prompt - at that paste in the SQL above - then type in ; and hit return
At the bottom I get
iTerm2|2021-05-10 09:48:10
openjdk16-zulu|2021-05-10 09:49:00
rust|2021-05-16 09:47:44

I have only upgraded rust today