Aspose::Email::Amp::AmpTimeago Class Reference

Provides fuzzy timestamps by formatting dates as "X time ago" More...

Inherits Aspose::Email::Amp::AmpComponent.

Public Member Functions

System::DateTime get_DateTime () const
 A datetime. More...
 
void set_DateTime (System::DateTime value)
 A datetime. More...
 
System::String get_Locale () const
 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 More...
 
void set_Locale (System::String value)
 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 More...
 
int32_t get_Cutoff () const
 Display the original date if time distance is older than cutoff (seconds). More...
 
void set_Cutoff (int32_t value)
 Display the original date if time distance is older than cutoff (seconds). More...
 
System::String get_RequiredScript () override
 Required script that muct be added to head section. More...
 
 AmpTimeago (System::DateTime dateTime)
 Create instance of AmpTimeago. More...
 
 AmpTimeago (System::DateTime dateTime, int32_t width, int32_t height)
 Create instance of AmpTimeago. More...
 
System::String ToAmpHtml () override
 Represents amp html version of component. More...
 
System::String ToHtml () override
 Represents html version of component. More...
 
- Public Member Functions inherited from Aspose::Email::Amp::AmpComponent
System::SharedPtr< AmpAttributesget_Attributes () const
 AMP provides a set of common attributes that are extended to many AMP components. More...
 
System::String get_Fallback () const
 A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element. More...
 
void set_Fallback (System::String value)
 A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element. More...
 
System::SharedPtr< AmpComponentget_Placeholder () const
 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. More...
 
void set_Placeholder (System::SharedPtr< AmpComponent > value)
 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. More...
 
 AmpComponent ()
 

Detailed Description

Provides fuzzy timestamps by formatting dates as "X time ago"

Constructor & Destructor Documentation

◆ AmpTimeago() [1/2]

Aspose::Email::Amp::AmpTimeago::AmpTimeago ( System::DateTime  dateTime)

Create instance of AmpTimeago.

Parameters
dateTime

◆ AmpTimeago() [2/2]

Aspose::Email::Amp::AmpTimeago::AmpTimeago ( System::DateTime  dateTime,
int32_t  width,
int32_t  height 
)

Create instance of AmpTimeago.

Parameters
dateTime
width
height

Member Function Documentation

◆ get_Cutoff()

int32_t Aspose::Email::Amp::AmpTimeago::get_Cutoff ( ) const

Display the original date if time distance is older than cutoff (seconds).

◆ get_DateTime()

System::DateTime Aspose::Email::Amp::AmpTimeago::get_DateTime ( ) const

A datetime.

◆ get_Locale()

System::String Aspose::Email::Amp::AmpTimeago::get_Locale ( ) const

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

◆ get_RequiredScript()

System::String Aspose::Email::Amp::AmpTimeago::get_RequiredScript ( )
overridevirtual

Required script that muct be added to head section.

Implements Aspose::Email::Amp::AmpComponent.

◆ set_Cutoff()

void Aspose::Email::Amp::AmpTimeago::set_Cutoff ( int32_t  value)

Display the original date if time distance is older than cutoff (seconds).

◆ set_DateTime()

void Aspose::Email::Amp::AmpTimeago::set_DateTime ( System::DateTime  value)

A datetime.

◆ set_Locale()

void Aspose::Email::Amp::AmpTimeago::set_Locale ( System::String  value)

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

◆ ToAmpHtml()

System::String Aspose::Email::Amp::AmpTimeago::ToAmpHtml ( )
overridevirtual

Represents amp html version of component.

Returns

Implements Aspose::Email::Amp::AmpComponent.

◆ ToHtml()

System::String Aspose::Email::Amp::AmpTimeago::ToHtml ( )
overridevirtual

Represents html version of component.

Returns

Implements Aspose::Email::Amp::AmpComponent.