src/umbraco.presentation.xslt.Exslt/ExsltDatesAndTimes.cs
/// <summary>
/// Implements the following function
///   number date:week-in-year(string)
/// </summary>
/// <returns>The week part of the specified date or the empty string if the 
/// date is invalid</returns>
/// <remarks>Does not support dates in the format of the xs:yearMonth or 
/// xs:gYear types. This method uses the Calendar.GetWeekOfYear() method 
/// with the CalendarWeekRule and FirstDayOfWeek of the current culture.
/// THE RESULTS OF CALLING THIS FUNCTION VARIES ACROSS CULTURES</remarks>
Implements the following function
number date:week-in-year(string)
Implements the following function number date : week - in - year ( string )
public static double weekinyear(string d){
			try{
				DateTime date = DateTime.Parse(d); 
				return weekinyear(date); 
			}catch(FormatException){
				return System.Double.NaN; 
			}
		}
public static double weekinyear ( string d ) { try { DateTime date = DateTime . Parse ( d ) ; return weekinyear ( date ) ; } catch ( FormatException ) { return System . Double . NaN ; } }
Implements the following function
number date:week-in-year(string)
Implements the following function number date : week - in - year ( string )
The week part of the specified date or the empty string if the
date is invalid
The week part of the specified date or the empty string if the date is invalid
d
string
remarks
Does not support dates in the format of the xs:yearMonth or
xs:gYear types. This method uses the Calendar.GetWeekOfYear() method
with the CalendarWeekRule and FirstDayOfWeek of the current culture.
THE RESULTS OF CALLING THIS FUNCTION VARIES ACROSS CULTURES
Does not support dates in the format of the xs : yearMonth or xs : gYear types . This method uses the Calendar . GetWeekOfYear () method with the CalendarWeekRule and FirstDayOfWeek of the current culture . THE RESULTS OF CALLING THIS FUNCTION VARIES ACROSS CULTURES