home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
QBAS
/
PBC22B.ZIP
/
PBC$BAS.ZIP
/
WEEKDAY1.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-04-15
|
1KB
|
25 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1993 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