HtmlHelperExtensions.TimeWhen Method
- Namespace:
- Weavy.Web.Extensions
- Assembly:
- Weavy.Web.dll
Overloads
Time |
Returns a <time> element when the specified date occured. |
Time |
Returns a <time> element when the specified date occured. |
TimeWhen(HtmlHelper, DateTime, bool)
Returns a <time> element when the specified date occured.
public static MvcHtmlString TimeWhen(this HtmlHelper helper, DateTime date, bool abbrev = false)
Parameters
- helper
- System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
- date
- System.DateTime
The (UTC) date to return as text.
- abbrev
- bool
Returns
System.Web.Mvc.MvcHtmlString
TimeWhen(HtmlHelper, DateTime?, bool)
Returns a <time> element when the specified date occured.
public static MvcHtmlString TimeWhen(this HtmlHelper helper, DateTime? date, bool abbrev = false)
Parameters
- helper
- System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
- date
- System.DateTime?
The (UTC) date to return as text.
- abbrev
- bool
Returns
System.Web.Mvc.MvcHtmlString