How can I have alternating week numbers using a set date as week 1 in VB.net?

78 views Asked by At

I am using daypilot pro to generate a timeline. As per usual, we had the project built and finalised to spec when a spanner was thrown in the works. The department this tool was built for works off "week 1" and "week 2".

Here is a screen shot as to where we are. enter image description here

You will see "week 6" in the screen shot, this is generated from the following vb.net code.

Protected Sub DayPilotScheduler1_BeforeTimeHeaderRender(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.BeforeTimeHeaderRenderEventArgs)

        If e.Level = 1 Then
            e.InnerHTML = String.Format("Week {0}", Week.WeekNrISO8601(e.Start))
        End If

    End Sub

What i want to do is generate alternating weeks, i.e. Week 1, Week 2, Week 1, Week 2. I will have to use a date identified by the department who want to use this tool as week 1, and calculate this going forward in the code.

Any advice or suggestions would greatly be appreciated.

0

There are 0 answers