C# 클래스 Castle.MonoRail.Framework.Helpers.DateFormatHelper

Simple helper for date formatting
상속: AbstractHelper
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono 1 사용 예제들

공개 메소드들

메소드 설명
AlternativeFriendlyFormatFromNow ( System.DateTime date ) : String

Alternative representation of a difference between the specified date and now. If within 24hr it returns Today. If within 48hr it returns Yesterday. If within 40 days it returns x days ago and otherwise it returns x months ago

TODO: Think about i18n

FriendlyFormatFromNow ( System.DateTime date ) : String

Returns the difference from the specified date the the current date in a friendly string like "1 day ago"

TODO: Think about i18n

ToShortDate ( System.DateTime date ) : String

Formats to short date

ToShortDateTime ( System.DateTime date ) : String

Formats to short date

메소드 상세

AlternativeFriendlyFormatFromNow() 공개 메소드

Alternative representation of a difference between the specified date and now. If within 24hr it returns Today. If within 48hr it returns Yesterday. If within 40 days it returns x days ago and otherwise it returns x months ago

TODO: Think about i18n

public AlternativeFriendlyFormatFromNow ( System.DateTime date ) : String
date System.DateTime The date in the past (should be equal or less than now)
리턴 String

FriendlyFormatFromNow() 공개 메소드

Returns the difference from the specified date the the current date in a friendly string like "1 day ago"

TODO: Think about i18n

public FriendlyFormatFromNow ( System.DateTime date ) : String
date System.DateTime The date in the past (should be equal or less than now)
리턴 String

ToShortDate() 공개 메소드

Formats to short date
public ToShortDate ( System.DateTime date ) : String
date System.DateTime
리턴 String

ToShortDateTime() 공개 메소드

Formats to short date
public ToShortDateTime ( System.DateTime date ) : String
date System.DateTime
리턴 String