Page 5 of 5

Re: Happy Birthday Fred!

Posted: Sat Apr 01, 2017 3:40 pm
by Thunder93
Happy Birthday Frédéric. You becoming little more wiser now, congrats! :lol: :P

Re: Happy Birthday Fred!

Posted: Sat Apr 01, 2017 10:53 pm
by Kurzer
Happy Birthday, Fred.

Thank you for your reliable product that you have developed and supported over many years and thank you for being so faithful to yourself all the time. Stay as you are, because you are just a great person and developer.

Many congratulations and many more successful years.
Kurzer

Re: Happy Birthday Fred!

Posted: Sun Apr 02, 2017 12:45 am
by Demivec

Code: Select all

Procedure.s ordinal(number)
  Protected ordinalSuffix.s
  Select Right(Str(number), 1)
    Case "1": ordinalSuffix = "st"
    Case "2": ordinalSuffix = "nd"
    Case "3": ordinalSuffix = "rd"
    Default: ordinalSuffix = "th"
  EndSelect
  
  ProcedureReturn Str(number) + ordinalSuffix
EndProcedure

If Year(Date()) > 1977 And Year(Date()) < 2038
  currentBirthday = Year(Date()) - 1977
  
  If Month(Date()) = 4 And Day(Date()) = 1
    Expression$ = "Happy " + ordinal(currentBirthday) + " birthday Fred!!!"
    MessageRequester("Congratulations", Expression$)
  Else
    Expression$ = "I just heard, Happy belated " + ordinal(currentBirthday) + " birthday Fred!"
    MessageRequester("Congratulations", Expression$)
  EndIf
  
Else
  MessageRequester("Urgent!", "Happy 60+ years Fred, PureBasic's Date Library needs an update.")
EndIf
:D

Re: Happy Birthday Fred!

Posted: Sun Apr 02, 2017 6:12 am
by Fred
Thank you all :)

Re: Happy Birthday Fred!

Posted: Sun Apr 02, 2017 9:43 am
by Polo
Happy birthday :)