4 |
The LA Fox DeveloDer Newsletter
|
Auaust 1998
|
Y2K
(Con’t from page 1)
Date; Select All on Entry
This textbox date entry class does the following:
-
Accepts 02/29/2000, not 02/29/00
-
Resets to blank
-
Correct order for Windows date setting
-
Refreshes on entry of each digit
*
CLASS DateTextBox.InteractlveChangeO
*
Author/Date: Judy Denison 06/26/98
a
Description: Sets running status bar display
a
calls: None
a
Find correct date, referring to rollover year WiTH THIS
AND YEAR(.Value)
<
.nRolloverYear
IdDate
=
GOMONTH(.Value, 1200)
ENDWITH
*
Long date In Canadian word order If appropriate
a
(Canadian settings should be ‘DMY’) IcDate
=
IIF(SET(’DATE’)
=
‘DMY’,;
DMY(IdDate),
MDY(ldDate))
SET MESSAGE TO lcDate
RflURN
|
a
Author/Date: Judy Denison 06/26/98
a
Description: Checks for reasonable year; sets to 21st
*
Parameters: None
a
Variables: None
a
Returns:
.TJ.F.
*
Calls: None
*
Called by: None
STORE” TO lcNotlfy
STORE 0 TO lnYear WiTH THIS
Get old NOTIFY setting
IcNotify
=
.cNotify
*0K if empty IF EMPTY(.Value)
.Value
=
(ll}
a
Reset all and leave field
SET MESSAGE TO .ToolTipText
“
SET NOTIFY &lcNotify RETURN .T.
Reset & message if year
*
not between 1900 and 2100 lnYear
•
YEAR(.Value)
IF InYear
<
1900 OR lnYear> 2100
.Value
=
(II)
SET MESSAGE TO;
‘Year must be
between
RETURN .F.
ENDF
Go to 21st century If c Rollover Year
IF lnYear c .nRolloverYear
.Value
=
GOMONTH(.Value, 1200)
ENDIF
*
ToolTip: Long date In Canadian word order
*
If appropriate .ToolTipText lIF(SET(’DATE’)
=
‘DMY’,;
*
Remove status message on leaving field
SET MESSAGE TO
a
Restore NOTIFY to original
setting
SET NOTIFY &lcNotify
ENDWITH
RETURN.T.
a
End: CLASS DateTextBox.Valid()
|
a
End: CLASS DateTextBox.InteractlveChange()
|
CLASS DateTextBox.Valid()
|
(Con’t, page
5)
|
4 |