home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form DTFrm
- BackColor = &H00C0C0C0&
- Caption = "Date and Time"
- ClientHeight = 4020
- ClientLeft = 1965
- ClientTop = 1770
- ClientWidth = 5610
- ForeColor = &H00000000&
- Height = 4425
- Left = 1905
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 4020
- ScaleWidth = 5610
- Top = 1425
- Width = 5730
- Begin TextBox JEnd
- BorderStyle = 0 'None
- Height = 225
- Left = 1320
- TabIndex = 1
- Top = 3300
- Width = 1020
- End
- Begin TextBox JStart
- BorderStyle = 0 'None
- Height = 225
- Left = 1320
- TabIndex = 0
- Text = "04-01-1981"
- Top = 2835
- Width = 1020
- End
- Begin CommandButton JulCmd
- Caption = "Julian"
- Height = 315
- Left = 4185
- TabIndex = 2
- Top = 2625
- Width = 645
- End
- Begin Label JEndJ
- BackColor = &H00C0C0C0&
- Height = 225
- Left = 2520
- TabIndex = 25
- Top = 3300
- Width = 1065
- End
- Begin Label Label12
- BackColor = &H00C0C0C0&
- Caption = "End Date:"
- Height = 225
- Left = 315
- TabIndex = 21
- Top = 3300
- Width = 885
- End
- Begin Label JMsg
- BorderStyle = 1 'Fixed Single
- Height = 465
- Left = 3765
- TabIndex = 22
- Top = 3000
- Width = 1455
- End
- Begin Label JstartJ
- BackColor = &H00C0C0C0&
- Height = 225
- Left = 2520
- TabIndex = 24
- Top = 2835
- Width = 1065
- End
- Begin Label Label11
- BackColor = &H00C0C0C0&
- Caption = "Start Date:"
- Height = 225
- Left = 315
- TabIndex = 20
- Top = 2850
- Width = 960
- End
- Begin Label Label13
- BackColor = &H00C0C0C0&
- Caption = "Julian Date"
- Height = 195
- Left = 2535
- TabIndex = 23
- Top = 2595
- Width = 1065
- End
- Begin Label Label10
- BackColor = &H00C0C0C0&
- Caption = " Julian Dating"
- Height = 210
- Left = 465
- TabIndex = 19
- Top = 2385
- Width = 1245
- End
- Begin Label Label9
- BackColor = &H00C0C0C0&
- Caption = "Label9"
- Height = 195
- Left = 3840
- TabIndex = 18
- Top = 1980
- Width = 1260
- End
- Begin Label Label7
- BackColor = &H00C0C0C0&
- Caption = "Current Ticks:"
- Height = 195
- Left = 2430
- TabIndex = 17
- Top = 1965
- Width = 1290
- End
- Begin Label DTLbl
- BackColor = &H00C0C0C0&
- Caption = "Label9"
- ForeColor = &H00FF0000&
- Height = 210
- Index = 5
- Left = 1560
- TabIndex = 10
- Top = 1995
- Width = 420
- End
- Begin Label DTLbl
- BackColor = &H00C0C0C0&
- Caption = "Label7"
- ForeColor = &H00FF0000&
- Height = 195
- Index = 4
- Left = 1560
- TabIndex = 9
- Top = 1785
- Width = 420
- End
- Begin Label TLbl
- BackColor = &H00C0C0C0&
- Caption = "Label10"
- Height = 195
- Index = 3
- Left = 4425
- TabIndex = 16
- Top = 1500
- Width = 330
- End
- Begin Label DTLbl
- BackColor = &H00C0C0C0&
- Caption = "Label6"
- ForeColor = &H00FF0000&
- Height = 195
- Index = 3
- Left = 1560
- TabIndex = 8
- Top = 1500
- Width = 435
- End
- Begin Label TLbl
- BackColor = &H00C0C0C0&
- Caption = "Label9"
- Height = 195
- Index = 2
- Left = 4425
- TabIndex = 15
- Top = 1305
- Width = 330
- End
- Begin Label DTLbl
- BackColor = &H00C0C0C0&
- Caption = "Label5"
- ForeColor = &H00FF0000&
- Height = 195
- Index = 2
- Left = 1560
- TabIndex = 7
- Top = 1305
- Width = 420
- End
- Begin Label TLbl
- BackColor = &H00C0C0C0&
- Caption = "Label7"
- Height = 195
- Index = 1
- Left = 4425
- TabIndex = 14
- Top = 1125
- Width = 330
- End
- Begin Label DTLbl
- BackColor = &H00C0C0C0&
- Caption = "Label4"
- ForeColor = &H00FF0000&
- Height = 195
- Index = 1
- Left = 1545
- TabIndex = 6
- Top = 1110
- Width = 435
- End
- Begin Label Label6
- BackColor = &H00C0C0C0&
- Caption = " WGLib Style"
- Height = 210
- Left = 3300
- TabIndex = 13
- Top = 870
- Width = 1170
- End
- Begin Label Label3
- BackColor = &H00C0C0C0&
- Caption = " WGLib Format"
- Height = 210
- Left = 480
- TabIndex = 5
- Top = 855
- Width = 1305
- End
- Begin Label Label5
- BackColor = &H00C0C0C0&
- Caption = "Label5"
- Height = 210
- Left = 4110
- TabIndex = 12
- Top = 450
- Width = 825
- End
- Begin Label Label4
- BackColor = &H00C0C0C0&
- Caption = "BASIC Time:"
- Height = 240
- Left = 2955
- TabIndex = 11
- Top = 435
- Width = 1110
- End
- Begin Label Label2
- BackColor = &H00C0C0C0&
- ForeColor = &H00000000&
- Height = 255
- Left = 1395
- TabIndex = 4
- Top = 450
- Width = 975
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- Caption = "BASIC Date:"
- Height = 255
- Left = 165
- TabIndex = 3
- Top = 450
- Width = 1095
- End
- DefInt A-Z
- Sub Form_Load ()
- Label2.Caption = Date$
- Label5.Caption = Time$
- JEnd.text = Date$
- dow = DOSDate(m%, d%, yr%)
- doy = DayOfYr()
- DtLbl(1).Caption = Str$(m)
- DtLbl(2).Caption = Str$(d)
- DtLbl(3).Caption = LTrim$(Str$(yr))
- DtLbl(4).Caption = Str$(dow)
- DtLbl(5).Caption = Str$(doy)
- errc = DOSTime(h, m, s)
- TLbl(1).Caption = Str$(h)
- TLbl(2).Caption = Str$(m)
- TLbl(3).Caption = Str$(s)
- t& = SysTicks&()
- Label9.Caption = LTrim$(Str$(t&))
- End Sub
- Sub Form_Paint ()
- DtFrm.ForeColor = QBColor(0)
- CurrentX = 375
- CurrentY = 1110
- DtFrm.Print "Month:"
- CurrentX = 375
- CurrentY = 1305
- DtFrm.Print " Day:"
- CurrentX = 375
- CurrentY = 1515
- DtFrm.Print " Year:"
- CurrentX = 260
- CurrentY = 1800
- DtFrm.Print "Day of Week:"
- CurrentX = 260
- CurrentY = 2010
- DtFrm.Print " Day of Year:"
- CurrentY = 1110
- CurrentX = 3135
- Print "Hour:"
- CurrentY = 1305
- CurrentX = 3135
- Print " Min:"
- CurrentY = 1500
- CurrentX = 3135
- Print " Sec:"
- EmpressFrm DtFrm, 950, 205, 2300, 2100, 1
- EmbossFrm DtFrm, 950, 3015, 1755, 4890, 1
- EmpressFrm DtFrm, 2500, 240, 3715, 5400, 2
- ConvexFrm DtFrm, 4
- ConcaveCtl JMsg, 3
- ConcaveCtl JStart, 3
- ConcaveCtl JEnd, 3
- ConcaveCtl JstartJ, 3
- ConcaveCtl JEndJ, 3
- JStart.SetFocus
- End Sub
- Sub JEnd_LostFocus ()
- sd$ = LTrim$(RTrim$(JEnd.text))
- If Len(sd$) = 10 Then
- Call ParseDate(sd$, m, d, y)
- j& = Julian(m, d, y)
- End If
- JEndJ.Caption = Str$(j&)
- End Sub
- Sub JStart_LostFocus ()
- sd$ = LTrim$(RTrim$(JStart.text))
- If Len(sd$) = 10 Then
- Call ParseDate(sd$, m, d, y)
- j& = Julian(m, d, y)
- End If
- JstartJ.Caption = Str$(j&)
- End Sub
- Sub JulCmd_Click ()
- d$ = LTrim$(RTrim$(JStart.text))
- If Len(d$) < 10 Then
- msg$ = "Julian dates must be in the format 'mm/dd/yyyy'"
- MsgBox msg$, 64, "Whoops"
- JStart.SetFocus
- End If
- Call ParseDate(d$, smo, sda, syr)
-
- d$ = LTrim$(RTrim$(JEnd.text))
- If Len(d$) < 10 Then
- msg$ = "Julian dates must be in the format 'mm/dd/yyyy'"
- MsgBox msg$, 64, "Whoops"
- JEnd.SetFocus
- End If
- Call ParseDate(d$, emo, eda, eyr)
- JBeg& = Julian(smo, sda, syr)
- JEndd& = Julian(emo, eda, eyr)
- DayDiff& = Abs(JEndd& - JBeg&)
- JstartJ.Caption = Str$(JBeg&)
- JEndJ.Caption = Str$(JEndd&)
- JMsg.Caption = "The difference in days is" + Str$(DayDiff&) + "."
- End Sub
- Sub ParseDate (d$, mo, da, yr)
- mo = Val(Left$(d$, 2))
- yr = Val(Right$(d$, 4))
- da = Val(Mid$(d$, 4, 2))
- End Sub
-