C# 클래스 Sage.XsltExtensions.Date

파일 보기 프로젝트 열기: igorfrance/sage

공개 메소드들

메소드 설명
date ( string dateTime ) : string

Parses the specified dateTime as DateTime and returns only the date as string, formatted using the default date format

date ( string dateTime, string dateFormat ) : string

Parses the specified dateTime as DateTime and returns only the date as string, formatted using the specified dateFormat.

day ( string dateTime ) : int

Parses the specified dateTime as DateTime and returns the day.

difference ( string dateTime1, string dateTime2 ) : int

Returns the difference, in days, between dateTime1 and dateTime2.

difference ( string dateTime1, string dateTime2, string unit ) : int

Returns the difference, in the specfied unit, between dateTime1 and dateTime2.

hour ( string dateTime ) : int

Parses the specified dateTime as DateTime and returns the hour.

minute ( string dateTime ) : int

Parses the specified dateTime as DateTime and returns the minute.

month ( string dateTime ) : int

Parses the specified dateTime as DateTime and returns the month.

nearestWeekday ( string dateTime, byte weekDay ) : string

Gets the nearest date on which the specified weekDay occurs, starting from and including the date parsed from dateTime, and formatted using the default date format.

nearestWeekday ( string dateTime, byte weekDay, string dateFormat ) : string

Gets the nearest date on which the specified weekDay occurs, starting from and including the date parsed from dateTime, and formatted using the specified dateFormat.

quarter ( string dateTime ) : int

Parses the specified dateTime as DateTime and returns the quarter.

second ( string dateTime ) : int

Parses the specified dateTime as DateTime and returns the second.

time ( string dateTime ) : string

Parses the specified dateTime as DateTime and returns only the time as string, formatted using the default time format

time ( string dateTime, string timeFormat ) : string

Parses the specified dateTime as DateTime and returns only the date as string, formatted using the specified timeFormat.

year ( string dateTime ) : int

Parses the specified dateTime as DateTime and returns the year.

비공개 메소드들

메소드 설명
parse ( string dateTime ) : DateTime?

메소드 상세

date() 공개 메소드

Parses the specified dateTime as DateTime and returns only the date as string, formatted using the default date format
public date ( string dateTime ) : string
dateTime string The date-time string to parse.
리턴 string

date() 공개 메소드

Parses the specified dateTime as DateTime and returns only the date as string, formatted using the specified dateFormat.
public date ( string dateTime, string dateFormat ) : string
dateTime string The date-time string to parse.
dateFormat string The string that specifies how to format the resulting date string.
리턴 string

day() 공개 메소드

Parses the specified dateTime as DateTime and returns the day.
public day ( string dateTime ) : int
dateTime string The date-time string to parse.
리턴 int

difference() 공개 메소드

Returns the difference, in days, between dateTime1 and dateTime2.
public difference ( string dateTime1, string dateTime2 ) : int
dateTime1 string The first date
dateTime2 string The second date
리턴 int

difference() 공개 메소드

Returns the difference, in the specfied unit, between dateTime1 and dateTime2.
public difference ( string dateTime1, string dateTime2, string unit ) : int
dateTime1 string The first date
dateTime2 string The second date
unit string The unit in which to return the difference. Valid values are 'days', 'weeks', 'months' /// and 'years'.
리턴 int

hour() 공개 메소드

Parses the specified dateTime as DateTime and returns the hour.
public hour ( string dateTime ) : int
dateTime string The date-time string to parse.
리턴 int

minute() 공개 메소드

Parses the specified dateTime as DateTime and returns the minute.
public minute ( string dateTime ) : int
dateTime string The date-time string to parse.
리턴 int

month() 공개 메소드

Parses the specified dateTime as DateTime and returns the month.
public month ( string dateTime ) : int
dateTime string The date-time string to parse.
리턴 int

nearestWeekday() 공개 메소드

Gets the nearest date on which the specified weekDay occurs, starting from and including the date parsed from dateTime, and formatted using the default date format.
public nearestWeekday ( string dateTime, byte weekDay ) : string
dateTime string The date-time string to parse.
weekDay byte The week day.
리턴 string

nearestWeekday() 공개 메소드

Gets the nearest date on which the specified weekDay occurs, starting from and including the date parsed from dateTime, and formatted using the specified dateFormat.
public nearestWeekday ( string dateTime, byte weekDay, string dateFormat ) : string
dateTime string The date-time string to parse.
weekDay byte The week day.
dateFormat string The string that specifies how to format the resulting date string.
리턴 string

quarter() 공개 메소드

Parses the specified dateTime as DateTime and returns the quarter.
public quarter ( string dateTime ) : int
dateTime string The date-time string to parse.
리턴 int

second() 공개 메소드

Parses the specified dateTime as DateTime and returns the second.
public second ( string dateTime ) : int
dateTime string The date-time string to parse.
리턴 int

time() 공개 메소드

Parses the specified dateTime as DateTime and returns only the time as string, formatted using the default time format
public time ( string dateTime ) : string
dateTime string The date-time string to parse.
리턴 string

time() 공개 메소드

Parses the specified dateTime as DateTime and returns only the date as string, formatted using the specified timeFormat.
public time ( string dateTime, string timeFormat ) : string
dateTime string The date-time string to parse.
timeFormat string The string that specifies how to format the resulting time string.
리턴 string

year() 공개 메소드

Parses the specified dateTime as DateTime and returns the year.
public year ( string dateTime ) : int
dateTime string The date-time string to parse.
리턴 int