C# Class Itenso.TimePeriod.TimeFormatter

Inheritance: ITimeFormatter
Mostrar archivo Open project: jwg4/date-difference Class Usage Examples

Public Methods

Method Description
GetCalendarPeriod ( string start, string end, System.TimeSpan duration ) : string
GetCalendarPeriod ( string context, string start, string end, System.TimeSpan duration ) : string
GetCalendarPeriod ( string startContext, string endContext, string start, string end, System.TimeSpan duration ) : string
GetCollection ( int count ) : string
GetCollectionPeriod ( int count, System.DateTime start, System.DateTime end, System.TimeSpan duration ) : string
GetDateTime ( System.DateTime dateTime ) : string
GetDuration ( System.TimeSpan timeSpan ) : string
GetDuration ( System.TimeSpan timeSpan, DurationFormatType durationFormatType ) : string
GetDuration ( int years, int months, int days, int hours, int minutes, int seconds ) : string
GetInterval ( System.DateTime start, System.DateTime end, IntervalEdge startEdge, IntervalEdge endEdge, System.TimeSpan duration ) : string
GetLongTime ( System.DateTime dateTime ) : string
GetPeriod ( System.DateTime start, System.DateTime end ) : string
GetPeriod ( System.DateTime start, System.DateTime end, System.TimeSpan duration ) : string
GetShortDate ( System.DateTime dateTime ) : string
GetShortTime ( System.DateTime dateTime ) : string
TimeFormatter ( ) : System
TimeFormatter ( CultureInfo culture = null, string contextSeparator = "; ", string startEndSeparator = " - ", string durationSeparator = " | ", string dateTimeFormat = null, string shortDateFormat = null, string longTimeFormat = null, string shortTimeFormat = null, DurationFormatType durationType = DurationFormatType.Compact, bool useDurationSeconds = false, bool useIsoIntervalNotation = false ) : System

Method Details

GetCalendarPeriod() public method

public GetCalendarPeriod ( string start, string end, System.TimeSpan duration ) : string
start string
end string
duration System.TimeSpan
return string

GetCalendarPeriod() public method

public GetCalendarPeriod ( string context, string start, string end, System.TimeSpan duration ) : string
context string
start string
end string
duration System.TimeSpan
return string

GetCalendarPeriod() public method

public GetCalendarPeriod ( string startContext, string endContext, string start, string end, System.TimeSpan duration ) : string
startContext string
endContext string
start string
end string
duration System.TimeSpan
return string

GetCollection() public method

public GetCollection ( int count ) : string
count int
return string

GetCollectionPeriod() public method

public GetCollectionPeriod ( int count, System.DateTime start, System.DateTime end, System.TimeSpan duration ) : string
count int
start System.DateTime
end System.DateTime
duration System.TimeSpan
return string

GetDateTime() public method

public GetDateTime ( System.DateTime dateTime ) : string
dateTime System.DateTime
return string

GetDuration() public method

public GetDuration ( System.TimeSpan timeSpan ) : string
timeSpan System.TimeSpan
return string

GetDuration() public method

public GetDuration ( System.TimeSpan timeSpan, DurationFormatType durationFormatType ) : string
timeSpan System.TimeSpan
durationFormatType DurationFormatType
return string

GetDuration() public method

public GetDuration ( int years, int months, int days, int hours, int minutes, int seconds ) : string
years int
months int
days int
hours int
minutes int
seconds int
return string

GetInterval() public method

public GetInterval ( System.DateTime start, System.DateTime end, IntervalEdge startEdge, IntervalEdge endEdge, System.TimeSpan duration ) : string
start System.DateTime
end System.DateTime
startEdge IntervalEdge
endEdge IntervalEdge
duration System.TimeSpan
return string

GetLongTime() public method

public GetLongTime ( System.DateTime dateTime ) : string
dateTime System.DateTime
return string

GetPeriod() public method

public GetPeriod ( System.DateTime start, System.DateTime end ) : string
start System.DateTime
end System.DateTime
return string

GetPeriod() public method

public GetPeriod ( System.DateTime start, System.DateTime end, System.TimeSpan duration ) : string
start System.DateTime
end System.DateTime
duration System.TimeSpan
return string

GetShortDate() public method

public GetShortDate ( System.DateTime dateTime ) : string
dateTime System.DateTime
return string

GetShortTime() public method

public GetShortTime ( System.DateTime dateTime ) : string
dateTime System.DateTime
return string

TimeFormatter() public method

public TimeFormatter ( ) : System
return System

TimeFormatter() public method

public TimeFormatter ( CultureInfo culture = null, string contextSeparator = "; ", string startEndSeparator = " - ", string durationSeparator = " | ", string dateTimeFormat = null, string shortDateFormat = null, string longTimeFormat = null, string shortTimeFormat = null, DurationFormatType durationType = DurationFormatType.Compact, bool useDurationSeconds = false, bool useIsoIntervalNotation = false ) : System
culture System.Globalization.CultureInfo
contextSeparator string
startEndSeparator string
durationSeparator string
dateTimeFormat string
shortDateFormat string
longTimeFormat string
shortTimeFormat string
durationType DurationFormatType
useDurationSeconds bool
useIsoIntervalNotation bool
return System