C# 클래스 DateTimeToNaturalTimeExtension, extensions

Converts a date time to a readable natural time (i.e. '10 hours', '2 years') or relative time (i.e. '5 days ago').
파일 보기 프로젝트 열기: netfx/extensions

공개 메소드들

메소드 설명
ToNaturalRelativeTime ( this date ) : string

Renders the given date as a natural language string, appending the "ago" suffix like "10 minutes ago".

ToNaturalTime ( this date ) : string

Renders the given date as a natural language string, like "10 minutes".

비공개 메소드들

메소드 설명
ToNaturalString ( this date, bool prependAgo ) : string

메소드 상세

ToNaturalRelativeTime() 공개 정적인 메소드

Renders the given date as a natural language string, appending the "ago" suffix like "10 minutes ago".
public static ToNaturalRelativeTime ( this date ) : string
date this The date to convert.
리턴 string

ToNaturalTime() 공개 정적인 메소드

Renders the given date as a natural language string, like "10 minutes".
public static ToNaturalTime ( this date ) : string
date this The date to convert.
리턴 string