Category : Files from Magazines
Archive   : V12N06.ZIP
Filename : BOMEOM.SC

 
Output of file : BOMEOM.SC contained in archive : V12N06.ZIP
;Bom(dDay) - Returns the first of the month
PROC Bom(dDay)
IF dDay = BLANKDATE() THEN
dDay = TODAY()
ENDIF
RETURN dDay - DAY(dDay) +1
ENDPROC

;Eom(dDay) - Returns the last of the month
PROC Eom(dDay)
PRIVATE dBump
IF dDay = BLANKDATE() THEN
dDay = TODAY()
ENDIF
dBump = dDay + 35 - Day(dDay)
RETURN dBump - Day(dBump)
ENDPROC

;The following script demonstrates the above procedures
CLEAR
MESSAGE "The first of this month is " + STRVAL(Bom(TODAY()))
SLEEP 2000
CLEAR
SLEEP 500
MESSAGE "The last of this month is " + STRVAL(Eom(BLANKDATE()))
SLEEP 2000


  3 Responses to “Category : Files from Magazines
Archive   : V12N06.ZIP
Filename : BOMEOM.SC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/