只需使用这样的东西:
@Echo Off
Rem Echo This script is based upon a default date format ending dd/MM/yyyy
Rem Echo Where "/" can be any usual separator and leading 0s are included.
Set "ToD=%DATE%"
Set "DoM=%ToD:~-10,2%"
Set "MoY=%ToD:~-7,2%"
Set "Yr=%ToD:~-4%"
If Not "%DoM:~,1%"=="1" (
If "%DoM:~-1%"=="1" Set "DaS=%DoM%st"
If "%DoM:~-1%"=="2" Set "DaS=%DoM%nd"
If "%DoM:~-1%"=="3" Set "DaS=%DoM%rd")
If Not Defined DaS Set "DaS=%DoM%th"
If "%DaS:~,1%"=="0" Set "DaS=%DaS:~1%"
If Not "%MoY:~,1%"=="1" (
If "%MoY:~-1%"=="1" Set "MaS=%MoY%st"
If "%MoY:~-1%"=="2" Set "MaS=%MoY%nd"
If "%MoY:~-1%"=="3" Set "MaS=%MoY%rd")
If Not Defined MaS Set "MaS=%MoY%th"
If "%MaS:~,1%"=="0" Set "MaS=%MaS:~1%"
If Not "%Yr:~-2,1%"=="1" (
If "%Yr:~-1%"=="1" Set "YaS=%Yr%st"
If "%Yr:~-1%"=="2" Set "YaS=%Yr%nd"
If "%Yr:~-1%"=="3" Set "YaS=%Yr%rd")
If Not Defined YaS Set "YaS=%Yr%th"
Echo Today is the %DaS% day of the %MaS% month of the %YaS% year
Timeout -1