C# Class Castle.MonoRail.Framework.Helpers.DateFormatHelper

Simple helper for date formatting
Inheritance: AbstractHelper
Afficher le fichier Open project: nats/castle-1.0.3-mono Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

AlternativeFriendlyFormatFromNow() public méthode

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)
Résultat String

FriendlyFormatFromNow() public méthode

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)
Résultat String

ToShortDate() public méthode

Formats to short date
public ToShortDate ( System.DateTime date ) : String
date System.DateTime
Résultat String

ToShortDateTime() public méthode

Formats to short date
public ToShortDateTime ( System.DateTime date ) : String
date System.DateTime
Résultat String