home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
dos
/
prg
/
bas
/
hanlin3
/
pbc30a
/
weekday1.bas
< prev
next >
Wrap
BASIC Source File
|
1994-03-13
|
1KB
|
25 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1994 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
DECLARE FUNCTION AscM% (St$, BYVAL Posn%)
DECLARE SUB DateA2R (BYVAL MonthNr%, BYVAL DayNr%, BYVAL YearNr%, RelDate&)
DECLARE SUB DateS2N (MonthNr%, DayNr%, YearNr%, DateSt$)
SUB WeekDay1 (MonthNr%, DayNr%, YearNr%, DayName$)
IF MonthNr% < 1 OR DayNr% < 1 OR YearNr% < 0 THEN
DateS2N M%, D%, Y%, DATE$
ELSE
M% = MonthNr%
D% = DayNr%
Y% = YearNr%
END IF
DateA2R M%, D%, Y%, RelDate&
WeekDayNr% = CINT(RelDate& MOD 7&) + 1
Posn% = AscM("ADGKQVY" , WeekDayNr%) - 64
Length% = AscM("3346535", WeekDayNr%) - 48
DayName$ = MID$("SunMonTuesWednesThursFriSatur", Posn%, Length%) + "day"
END SUB