System.Globalization.CCGregorianCalendar.GetDayOfYear C# (CSharp) Method

GetDayOfYear() public static method

The method gives the number of the day in the year.
public static GetDayOfYear ( System time ) : int
time System The /// that specifies a /// date. ///
return int
	public static int GetDayOfYear(System.DateTime time) {
		int rd = CCFixed.FromDateTime(time);
		int year = year_from_fixed(rd);
		int rd1_1 = fixed_from_dmy(1, 1, year);
		return rd - rd1_1 + 1;
	}

Usage Example

Example #1
0
 /// <summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
 /// <returns>An integer from 1 to 366 that represents the day of the year in the specified <see cref="T:System.DateTime" />.</returns>
 /// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
 public override int GetDayOfYear(DateTime time)
 {
     return(CCGregorianCalendar.GetDayOfYear(time));
 }
All Usage Examples Of System.Globalization.CCGregorianCalendar::GetDayOfYear