<?xml version="1.0" encoding="utf-16"?>
<Function xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.caseware-idea.com/">
    <Author>ElementB</Author>
    <DateModified>2016-04-07</DateModified>
    <FunctionName>weekMonStart</FunctionName>
    <Help>Well display the week of the year assuming that Monday is the week start.</Help>
    <OutputType>Numeric</OutputType>
    <FunctionBody>Option Explicit
Function weekMonStart(p1 As Date) As Double
	Dim dayOfWeek As Integer
	Dim weekOfYear As Integer
	dayOfWeek  = Format(p1, "w")
	weekOfYear = Format(p1, "ww")
	If dayOfWeek = 1 Then
		weekMonStart = weekOfYear  - 1
	Else
		weekMonStart = weekOfYear 
	End If

End Function
</FunctionBody>
    <Parameters>
        <Parameter>
            <Type>Date</Type>
            <Name>p1</Name>
            <Help />
        </Parameter>
    </Parameters>
</Function>