Draft

From CleanPosts

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
-
TC1948: Derash put Elam to the most refined torment, but che learned naught of the movements of the Remnant as they were led by Chokhmah himself by means of the Ark. And Jemuel and Rosh led a war party from among the people to assail the camp of Derash and release their brother.
+
Function DaysInMonth(FullDate As String, sDay As String) As Integer
 +
Dim i As Integer
 +
Dim iDay As Integer
 +
Dim iDay As Integer, iMatchDay As Integer
 +
Dim iDaysInMonth As Integer
 +
Dim FullDateNew As Date
-
TC1949: Elam put Derash to the sword in vengeance for his pain, and slew he also Hovan son of Bron the chieftain of Eniph. Jemuel's party wounded four others, but the unscathed jan and men were scattered into the depths of Shaula Wood and none save Telan Blackseed returned again.
+
iMatchDay = Weekday(FullDate)
-
 
+
Select Case UCase(sDay)
-
TC1950: But one among them made hez way to the city of Eniph in the Saiph League, and gave report to King Bron that hez son Hovan had been cruelly slain while a helpless captive of a band of nomads that counted a mere dozen men of fighting age
+
Case "SUN"
-
 
+
iDay = 1
-
TCXXXX: And Bron was greatly wroth, and mustered .
+
Case "MON"
-
 
+
iDay = 2
-
TC1950: And it came to pass that the Ark of the Covenant led the Remnant across a prairie of scattered oak trees between Adjara and Lake Enkaa, west between Mount Naratha and Mount Linan, and there the graven gold Director began to spin, and Elam called their wanderings to a halt.
+
Case "TUE"
-
 
+
iDay = 3
-
TC1951: When the Day of Atonement drew on, King Thausael led a pilgrimmage of many of the people from Hadal as well as others from throughout Nath to be present when made the yearly sacrifice for all the sins of the children of Israel, and perchance also to hear the oracles of God.
+
Case "WED"
-
 
+
iDay = 4
-
TC1952: But King Bron of Eniph in the Saiph League crossed the mouth of the River Sabik
+
Case "THU"
-
 
+
iDay = 5
-
In the battle Bron smote upon King Ravenmaster with many wounds, and the king fainted from the loss of blood and was carried away. After the battle casualties were so high on both sides that Bron ordered his people not to pursue the armies of King Ravenmaster as they withdrew again to the vale of Armak.
+
Case "FRI"
 +
iDay = 6
 +
Case "SAT"
 +
iDay = 7
 +
End Select
 +
iDaysInMonth = Day(DateAdd("d", -1, DateSerial _
 +
          (Year(FullDate), Month(FullDate) + 1, 1)))
 +
FullDateNew = DateSerial(Year(FullDate), Month(FullDate), iDaysInMonth)
 +
    For i = iDaysInMonth - 1 To 0 Step -1
 +
          If Weekday(FullDateNew - i) = iDay Then
 +
              DaysInMonth = DaysInMonth + 1
 +
          End If
 +
    Next i
 +
End Function

Revision as of 13:55, 22 February 2019

Function DaysInMonth(FullDate As String, sDay As String) As Integer Dim i As Integer Dim iDay As Integer Dim iDay As Integer, iMatchDay As Integer Dim iDaysInMonth As Integer Dim FullDateNew As Date

iMatchDay = Weekday(FullDate) Select Case UCase(sDay) Case "SUN" iDay = 1 Case "MON" iDay = 2 Case "TUE" iDay = 3 Case "WED" iDay = 4 Case "THU" iDay = 5 Case "FRI" iDay = 6 Case "SAT" iDay = 7 End Select iDaysInMonth = Day(DateAdd("d", -1, DateSerial _

         (Year(FullDate), Month(FullDate) + 1, 1)))

FullDateNew = DateSerial(Year(FullDate), Month(FullDate), iDaysInMonth)

   For i = iDaysInMonth - 1 To 0 Step -1
         If Weekday(FullDateNew - i) = iDay Then
             DaysInMonth = DaysInMonth + 1
         End If
   Next i

End Function

Personal tools
Strangers In Paradise