HtmlHelperExtensions.Time Method
- Namespace:
- Weavy.Web.Extensions
- Assembly:
- Weavy.Web.dll
Overloads
Time(Html |
Returns a <time> element with the specified date. |
Time(Html |
Returns a <time> element with the specified date. |
Time(HtmlHelper, DateTime, string, bool)
Returns a <time> element with the specified date.
public static MvcHtmlString Time(this HtmlHelper helper, DateTime date, string format = null, 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.
- format
- string
A standard or custom date and time format string.
- abbrev
- bool
Returns
System.Web.Mvc.MvcHtmlString
Time(HtmlHelper, DateTime?, string)
Returns a <time> element with the specified date.
public static MvcHtmlString Time(this HtmlHelper helper, DateTime? date, string format = null)
Parameters
- helper
- System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
- date
- System.DateTime?
The (UTC) date to return as text.
- format
- string
A standard or custom date and time format string.
Returns
System.Web.Mvc.MvcHtmlString