Class AmpTimeago
AmpTimeago class
Provides fuzzy timestamps by formatting dates as “X time ago”
public class AmpTimeago : AmpComponent
Constructors
| Name | Description |
|---|
| AmpTimeago(DateTime) | Create instance of AmpTimeago. |
| AmpTimeago(DateTime, int, int) | Create instance of AmpTimeago. |
Properties
| Name | Description |
|---|
| Attributes { get; } | AMP provides a set of common attributes that are extended to many AMP components. |
| Cutoff { get; set; } | Display the original date if time distance is older than cutoff (seconds). |
| DateTime { get; set; } | A datetime. |
| Fallback { get; set; } | A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element. |
| Locale { get; set; } | By default, the local is set to en; however, you can specify other locales. See full list of supported locales https://amp.dev/documentation/components/amp-timeago/?format=email |
| Placeholder { get; set; } | The element marked with the placeholder attribute acts as a placeholder for the parent AMP element. If specified, a placeholder element must be a direct child of the AMP element. |
| override RequiredScript { get; } | Required script that muct be added to head section. |
Methods
| Name | Description |
|---|
| override ToAmpHtml() | Represents amp html version of component. |
| override ToHtml() | Represents html version of component. |
See Also