The 31st day of a month (used as a calendar date). Not every month has a 31st day.
7月31日は月末なので請求書をまとめてください。
July 31st is the end of the month, so please organize the invoices.
今月は31日までありますか?
Does this month have 31 days?
夏休みの最終日は8月31日です。
The last day of summer vacation is August 31st.
A period of 31 days (duration).
博覧会は31日間にわたって開催された。
The exposition was held over a period of 31 days.
このコースは31日で完了します。
This course is completed in 31 days.
出張はだいたい31日間だった。
The business trip lasted about 31 days.