spz-timeago

Supported layouts: container

When to Use

When the user needs to display dates in formats such as a day ago, two days ago, a year ago, etc.

Code Demonstration

Basic

Use YYYY/MM/DD HH:mm:ss format date to configure datetime.

<spz-timeago layout="container" datetime="2021/5/10 15:36:11"></spz-timeago>

Properties

Property NameDescriptionTypeDefault ValueRequired
datetimeSpecify the date to be formatteddateType | number-Yes

dateType

Supported Date Formats
YYYY/MM/DD
YYYY/MM/DD HH:mm
YYYY/MM/DD HH:mm:ss

Placeholder Meanings

PlaceholderDescription
YYYYFour-digit year
MMMonth, two digits
DDDay of the month
HHHour, two digits
mmMinute, two digits
ssSecond, two digits

AI Summary (LLM Ready)

  • Component ID: spz-timeago
  • One-line purpose: Display some time ago.
  • Detected attribute rows: 0
  • Detected method subsections: 0
  • Detected event subsections: 0
  • Top attribute names: none (needs manual completion)
  • Top method names: none (needs manual completion)
  • Top event names: none (needs manual completion)
  • Reading order: start from usage/examples, then verify attributes, methods, and events.
  • Related docs: /en/guide/actions-and-events/ , /en/guide/layouts/