Day of Week (Gregorian || Julian)

This is a class that will return the day of the week for both the Gregorian and Julian calendars.

This is a class that will return the day of the week for both the Gregorian and Julian calendars.

 Example code: Dim DT As DayOfWeek Dim DOW As String Set DT = New DayOfWeek(Now) DOW = DT.Gregorian


 Class DayOfWeek Weekday As String Weekday As String Sub New (DT As Variant) Dim a, y, m As Integer a = 14 - Month(DT) y = Year(DT) - a m = Month(DT) + (12 * a) - 2 Me.Weekday = (5 + Day(DT) + y + (y / 4) + ((31 * m) / 12)) Mod 7 Me.Weekday = (Day(DT) + y + (y/4) - (y/100) + (y/400) + ((31*m)/12)) Mod 7 End Sub End Class
This was first published in September 2001

Dig deeper on Domino Resources - Part 3

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close