Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Long Date Function
#3
Even less LOC
Code: (Select All)
Do
    Line Input "mo-day-year: ", xdate$
    Print RTrim$(Mid$("January  February March    April    May      June     July     August   SeptemberOctober  November December ", (Val(Mid$(xdate$, 1, 2)) - 1) * 9 + 1, 9)); " ";
    Print LTrim$(Str$((Val(Mid$(xdate$, 4)))));
    If Mid$(xdate$, 4, 2) > "10" And Mid$(xdate$, 4, 2) < "21" Or Val(Mid$(xdate$, 5, 1)) = 0 Then
        Print "th, ";
    Else
        Print Mid$("stndrdthththththth", Val(Mid$(xdate$, 5, 1)) * 2 - 1, 2); ", ";
    End If
    Print Mid$(xdate$, 7, 4)
    Print
Loop
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
Long Date Function - by AtomicSlaughter - 05-21-2022, 09:20 PM
RE: Long Date Function - by Pete - 05-21-2022, 10:18 PM
RE: Long Date Function - by bplus - 05-24-2022, 08:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Function IsWord%(test$) bplus 5 237 02-26-2026, 02:51 PM
Last Post: mdijkens
  PrintW - print a long string, breaking it at the last space or hyphen before col. 79 TDarcos 21 4,076 04-22-2024, 09:52 PM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)