Friday the 13th

There is a theorie about the frightened Friday the 13th: Reason for the increased number of accidents happend on a Fridays which falls on the 13th day in the month, should be due to the fact there are more Fridays falling on a 13th in the month than on other days.

But…is it true…and how to prove it?
Sure! With CODE!

A piece of VB.net code should show the truth.
Dim aDays(31) As Integer

Sub Main()

  Dim dt As New Date(1600, 1, 1)

  While dt.Date <> Today
    If dt.DayOfWeek = DayOfWeek.Friday Then
      aDays(dt.Day) = aDays(dt.Day) + 1
    End If
    dt = dt.AddDays(1)
  End While

  For i As Integer = 1 To aDays.Length - 1
    Console.WriteLine(Str(i) & " = " & aDays(i) & " times")
  Next

  Console.ReadLine()

End Sub

And the console output:

Results of Friday 13th console output

Its a lie! In 416 years Fridays don’t falling exceptional often on the 13th of a month!

  • – quod erat demonstrandum

Leave a Reply

Your email address will not be published. Required fields are marked *