com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class AmpTimeago



  • public class AmpTimeago
    extends AmpComponent

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

    • Constructor Detail

      • AmpTimeago

        public AmpTimeago(Date dateTime)

        Create instance of AmpTimeago.

        Parameters:
        dateTime -
      • AmpTimeago

        public AmpTimeago(Date dateTime,
                  int width,
                  int height)

        Create instance of AmpTimeago.

        Parameters:
        dateTime -
        width -
        height -
    • Method Detail

      • getDateTime

        public final Date getDateTime()

        A datetime.

      • setDateTime

        public final void setDateTime(Date value)

        A datetime.

      • getLocale

        public final String getLocale()

        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

      • setLocale

        public final void setLocale(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

      • getCutoff

        public final int getCutoff()

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

      • setCutoff

        public final void setCutoff(int value)

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

      • toAmpHtml

        public String toAmpHtml()

        Represents amp html version of component.

        Specified by:
        toAmpHtml in class AmpComponent
        Returns:
      • toHtml

        public String toHtml()

        Represents html version of component.

        Specified by:
        toHtml in class AmpComponent
        Returns: