generate date ordinals function

main
Yuriy 7 months ago
parent 124a26c3b0
commit 8395c5c367

@ -594,6 +594,11 @@ CheckIfUpdateInstalled(PassedInArgument :=""){
} }
} }
; https://www.autohotkey.com/boards/viewtopic.php?t=59936
GetDateOrdinalSuffix(D) {
Static Special := {1: "st", 2: "nd", 3: "rd", 21: "st", 22: "nd", 23: "rd", 31: "st"}
Return D . ((S := Special[D]) ? S : "th")
}

Loading…
Cancel
Save