C# Класс Castle.MonoRail.Framework.Helpers.DateFormatHelper

Simple helper for date formatting
Наследование: AbstractHelper
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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