Метод | Описание | |
---|---|---|
AddWeeks ( this date, int value ) : System.DateTime |
�����������
|
|
CalculateAge ( this dateOfBirth ) : int |
��������
|
|
CalculateAge ( this dateOfBirth, System.DateTime referenceDate ) : int |
��������
|
|
ConvertToTimeZone ( this date, |
Converts a DateTime to a specific time zone
|
|
DateDiff ( this sourceDate, System.DateTime compareDate, DateInterval interval ) : long |
ʱ�����
|
|
DayOfWeek ( this date, DayOfWeek weekday, |
ȡ�ñ��ܵ����ڼ�
|
|
DaysBetween ( this fromDate, System.DateTime toDate ) : int |
������������֮������������
|
|
DaysCountOfMonth ( this date ) : int |
ȡ�õ�������
|
|
DaysInMonth ( this date ) : int |
Returns the number of days in the month
|
|
DaysLeftInMonth ( this date ) : int |
Gets the number of days left in the month based on the date passed in
|
|
DaysLeftInWeek ( this date ) : int |
Gets the number of days left in a week
|
|
DaysLeftInYear ( this date ) : int |
Gets the number of days left in a year based on the date passed in
|
|
DaysOfYear ( this date ) : int |
���ص�ǰ����������ݵ�������
|
|
EndOfDay ( this input ) : System.DateTime |
Returns the end of the day
|
|
FirstDayOfMonth ( this date ) : System.DateTime |
Returns the first day of a month based on the date sent in
|
|
FirstDayOfQuarter ( this date, System.DateTime quarter1Start = default(DateTime) ) : System.DateTime |
Returns the first day of a quarter based on the date sent in
|
|
FirstDayOfWeek ( this date, |
ȡ�ñ��ܵĵ�һ��
|
|
FirstDayOfYear ( this date ) : System.DateTime |
Returns the first day of a year based on the date sent in
|
|
FirstWeekdayOfMonth ( this date, DayOfWeek dayOfWeek ) : System.DateTime |
ȡ�õ��µĵ�һ�����ڼ�
|
|
FromUnixTime ( this date ) : System.DateTime |
Returns the Unix based date as a DateTime object
|
|
GetDate ( this dateTime ) : |
||
GetQuarter ( this date ) : int |
ȡ�õ�ǰʱ�����ڵڣ�����
|
|
GetTime ( this dateTime ) : Time | ||
IsDateEqual ( this date, System.DateTime dateToCompare ) : bool |
�ж������Ƿ���ͬ������ʱ�䲿��
|
|
IsFirstDayOfMonth ( this date ) : bool |
�ж��Ƿ�Ϊ���µ�һ��
|
|
IsInFuture ( this date ) : bool |
Determines if the date is some time in the future
|
|
IsInPast ( this date ) : bool |
Determines if the date is some time in the past
|
|
IsLastDayOfMonth ( this date ) : bool |
�ж��Ƿ�Ϊ�������һ��
|
|
IsLeapYear ( this date ) : bool | ||
IsTimeEqual ( this time, System.DateTime timeToCompare ) : bool |
�ж�ʱ���Ƿ���ͬ���������ڲ���
|
|
IsToday ( this date ) : bool |
Is this today?
|
|
IsWeekDay ( this date ) : bool |
Determines if this is a week day
|
|
IsWeekEnd ( this date ) : bool |
Determines if this is a week end
|
|
IsWeekend ( this date ) : bool |
�ж��Ƿ�Ϊ��ĩ(����������)
|
|
LastDayOfMonth ( this date ) : System.DateTime |
Returns the last day of the month based on the date sent in
|
|
LastDayOfQuarter ( this date, System.DateTime quarter1Start = default(DateTime) ) : System.DateTime |
Returns the last day of a quarter based on the date sent in
|
|
LastDayOfWeek ( this date, |
ȡ�ñ��ܵ����һ��
|
|
LastDayOfYear ( this date ) : System.DateTime |
Returns the last day of the year based on the date sent in
|
|
LastWeekdayOfMonth ( this date, DayOfWeek dayOfWeek ) : System.DateTime |
ȡ�õ��µ����һ�����ڼ�
|
|
NextDayOfWeek ( this currentDate, DayOfWeek weekday, bool includeCurrentDate = true ) : System.DateTime |
ȡ����һ�����ڼ�
|
|
PreviousWeekday ( this date, DayOfWeek weekday ) : System.DateTime |
ȡ����һ�����ڼ�
|
|
RelativeTime ( this input, System.DateTime epoch ) : string |
Converts the DateTime object to string describing, relatively how long ago or how far in the future the input is based off of another DateTime object specified. ex: Input=March 21, 2013 Epoch=March 22, 2013 returns "1 day ago" Input=March 22, 2013 Epoch=March 21, 2013 returns "1 day from now"
|
|
SetTime ( this date, System.TimeSpan time ) : System.DateTime |
Sets the time portion of a specific date
|
|
SetTime ( this date, int hour, int minutes, int seconds ) : System.DateTime |
Sets the time portion of a specific date
|
|
TimeSpanSince1970 ( this datetime ) : System.TimeSpan |
ȡ����1970-01-01����ʱ����
|
|
ToDateTimeOffset ( this localDateTime, |
תDateTimeOffset
|
|
ToUnix ( this date ) : int |
Returns the date in Unix format
|
|
UTCOffset ( this date ) : double |
Gets the UTC offset
|
|
WeeksOfYear ( this dateTime, |
���ص�ǰ��ݵ���������
|
Метод | Описание | |
---|---|---|
LocalTimeZone ( this date ) : |
||
Round ( double dVal ) : long |
public static AddWeeks ( this date, int value ) : System.DateTime | ||
date | this | ���� |
value | int | ���ӵ������� |
Результат | System.DateTime |
public static CalculateAge ( this dateOfBirth ) : int | ||
dateOfBirth | this | ���� |
Результат | int |
public static CalculateAge ( this dateOfBirth, System.DateTime referenceDate ) : int | ||
dateOfBirth | this | ���� |
referenceDate | System.DateTime | ����� |
Результат | int |
public static ConvertToTimeZone ( this date, |
||
date | this | DateTime to convert |
timeZone | Time zone to convert to | |
Результат | System.DateTime |
public static DateDiff ( this sourceDate, System.DateTime compareDate, DateInterval interval ) : long | ||
sourceDate | this | |
compareDate | System.DateTime | |
interval | DateInterval | ʱ����Ƚ�ö�� |
Результат | long |
public static DayOfWeek ( this date, DayOfWeek weekday, |
||
date | this | ���� |
weekday | DayOfWeek | ���ڼ� |
cultureInfo | �Ļ� | |
Результат | System.DateTime |
public static DaysBetween ( this fromDate, System.DateTime toDate ) : int | ||
fromDate | this | ���� |
toDate | System.DateTime | ���� |
Результат | int |
public static DaysCountOfMonth ( this date ) : int | ||
date | this | |
Результат | int |
public static DaysInMonth ( this date ) : int | ||
date | this | Date to get the month from |
Результат | int |
public static DaysLeftInMonth ( this date ) : int | ||
date | this | The date to check against |
Результат | int |
public static DaysLeftInWeek ( this date ) : int | ||
date | this | The date to check against |
Результат | int |
public static DaysLeftInYear ( this date ) : int | ||
date | this | The date to check against |
Результат | int |
public static DaysOfYear ( this date ) : int | ||
date | this | ���� |
Результат | int |
public static EndOfDay ( this input ) : System.DateTime | ||
input | this | Input date |
Результат | System.DateTime |
public static FirstDayOfMonth ( this date ) : System.DateTime | ||
date | this | Date to get the first day of the month from |
Результат | System.DateTime |
public static FirstDayOfQuarter ( this date, System.DateTime quarter1Start = default(DateTime) ) : System.DateTime | ||
date | this | Date to get the first day of the quarter from |
quarter1Start | System.DateTime | Beginning of the first quarter (defaults to the beginning of the year) |
Результат | System.DateTime |
public static FirstDayOfWeek ( this date, |
||
date | this | ���� |
cultureInfo | �Ļ� | |
Результат | System.DateTime |
public static FirstDayOfYear ( this date ) : System.DateTime | ||
date | this | Date to get the first day of the year from |
Результат | System.DateTime |
public static FirstWeekdayOfMonth ( this date, DayOfWeek dayOfWeek ) : System.DateTime | ||
date | this | ���� |
dayOfWeek | DayOfWeek | ���ڼ� |
Результат | System.DateTime |
public static FromUnixTime ( this date ) : System.DateTime | ||
date | this | Unix date to convert |
Результат | System.DateTime |
public static GetDate ( this dateTime ) : |
||
dateTime | this | |
Результат |
public static GetQuarter ( this date ) : int | ||
date | this | |
Результат | int |
public static GetTime ( this dateTime ) : Time | ||
dateTime | this | |
Результат | Time |
public static IsDateEqual ( this date, System.DateTime dateToCompare ) : bool | ||
date | this | ���� |
dateToCompare | System.DateTime | ���� |
Результат | bool |
public static IsFirstDayOfMonth ( this date ) : bool | ||
date | this | |
Результат | bool |
public static IsInFuture ( this date ) : bool | ||
date | this | Date to check |
Результат | bool |
public static IsInPast ( this date ) : bool | ||
date | this | Date to check |
Результат | bool |
public static IsLastDayOfMonth ( this date ) : bool | ||
date | this | |
Результат | bool |
public static IsLeapYear ( this date ) : bool | ||
date | this | |
Результат | bool |
public static IsTimeEqual ( this time, System.DateTime timeToCompare ) : bool | ||
time | this | ʱ�� |
timeToCompare | System.DateTime | ʱ�� |
Результат | bool |
public static IsToday ( this date ) : bool | ||
date | this | Date to check |
Результат | bool |
public static IsWeekDay ( this date ) : bool | ||
date | this | Date to check against |
Результат | bool |
public static IsWeekEnd ( this date ) : bool | ||
date | this | Date to check against |
Результат | bool |
public static IsWeekend ( this date ) : bool | ||
date | this | ���� |
Результат | bool |
public static LastDayOfMonth ( this date ) : System.DateTime | ||
date | this | Date to get the last day from |
Результат | System.DateTime |
public static LastDayOfQuarter ( this date, System.DateTime quarter1Start = default(DateTime) ) : System.DateTime | ||
date | this | Date to get the last day of the quarter from |
quarter1Start | System.DateTime | Beginning of the first quarter (defaults to the beginning of the year) |
Результат | System.DateTime |
public static LastDayOfWeek ( this date, |
||
date | this | ���� |
cultureInfo | �Ļ� | |
Результат | System.DateTime |
public static LastDayOfYear ( this date ) : System.DateTime | ||
date | this | Date to get the last day from |
Результат | System.DateTime |
public static LastWeekdayOfMonth ( this date, DayOfWeek dayOfWeek ) : System.DateTime | ||
date | this | ���� |
dayOfWeek | DayOfWeek | ���ڼ� |
Результат | System.DateTime |
public static NextDayOfWeek ( this currentDate, DayOfWeek weekday, bool includeCurrentDate = true ) : System.DateTime | ||
currentDate | this | ���� |
weekday | DayOfWeek | ���ڼ� |
includeCurrentDate | bool | ָ���Ƿ������ǰָ������ |
Результат | System.DateTime |
public static PreviousWeekday ( this date, DayOfWeek weekday ) : System.DateTime | ||
date | this | ���� |
weekday | DayOfWeek | ���ڼ� |
Результат | System.DateTime |
public static RelativeTime ( this input, System.DateTime epoch ) : string | ||
input | this | Input |
epoch | System.DateTime | DateTime object that the input is comparred to |
Результат | string |
public static SetTime ( this date, System.TimeSpan time ) : System.DateTime | ||
date | this | Date input |
time | System.TimeSpan | Time to set |
Результат | System.DateTime |
public static SetTime ( this date, int hour, int minutes, int seconds ) : System.DateTime | ||
date | this | Date input |
hour | int | Hour to set |
minutes | int | Minutes to set |
seconds | int | Seconds to set |
Результат | System.DateTime |
public static TimeSpanSince1970 ( this datetime ) : System.TimeSpan | ||
datetime | this | |
Результат | System.TimeSpan |
public static ToDateTimeOffset ( this localDateTime, |
||
localDateTime | this | ���� |
localTimeZone | ʱ�� | |
Результат | DateTimeOffset |
public static ToUnix ( this date ) : int | ||
date | this | Date to convert |
Результат | int |
public static UTCOffset ( this date ) : double | ||
date | this | Date to get the offset of |
Результат | double |
public static WeeksOfYear ( this dateTime, |
||
dateTime | this | |
cultureInfo | ||
Результат | int |