DateFormatHelper API Document
Simple helper for date formatting
Constructors
DateFormatHelper()
Initializes a new instance of the Castle.MonoRail.Framework.Helpers.DateFormatHelper class.
Methods
AlternativeFriendlyFormatFromNow(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
| Parameter | Description |
|---|---|
| date | The date in the past (should be equal or less than now) |
FriendlyFormatFromNow(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
| Parameter | Description |
|---|---|
| date | The date in the past (should be equal or less than now) |
FormatDate(DateTime date) : String
Formats to short date
| Parameter | Description |
|---|---|
| date |
ToShortDateTime(DateTime date) : String
Missing summary
| Parameter | Description |
|---|---|
| date | Missing documentation |