EastAsianLunisolarCalendar.GetDayOfYear(DateTime) 方法

定义

计算指定日期中的年中日期。Calculates the day of the year in the specified date.

public:
 override int GetDayOfYear(DateTime time);
public override int GetDayOfYear (DateTime time);
override this.GetDayOfYear : DateTime -> int
Public Overrides Function GetDayOfYear (time As DateTime) As Integer

参数

time
DateTime

要读取的 DateTimeThe DateTime to read.

返回

一个从 1 到 354(在平年中)或从 1 到 384(在闰年中)的整数,用于表示 time 参数中指定的年中日期。An integer from 1 through 354 in a common year, or 1 through 384 in a leap year, that represents the day of the year specified in the time parameter.

注解

一年中的某一天定义为从该年的第一天开始的天数。The day of the year is defined as the number of days from the first day of the year. 例如, GetDayOfYear对于第一个月的第一天, 返回 1 GetDayOfYear , 在上个月的最后一天, 返回该年份中的总天数, 这与返回GetDaysInYear的值相同。For example, GetDayOfYear for the first day of the first month returns 1, and GetDayOfYear for the last day of the last month returns the total number of days in that year, which is the same value returned by GetDaysInYear.

适用于