Login to follow
Time Interval Formatter

Time Interval Formatter (ODC)

Stable version 0.1.0 (Compatible with ODC)
Uploaded on 27 Jan by GOKULPRASANTH MUNUSAMY
Time Interval Formatter

Time Interval Formatter (ODC)

Documentation
0.1.0

Key Features

  • Converts DateTime values into natural, user-friendly text

  • Supports past and future dates

  • Handles common expressions like:

    • Just now

    • Minutes, hours, days, months, years

    • Yesterday / Tomorrow

  • Automatically pluralizes time units

  • Safe handling of invalid dates


Use Cases

  • Activity feeds (e.g., “Updated 2 hours ago”)

  • Notifications and alerts

  • Audit logs

  • Chat and messaging timelines

  • Task and event lists

  • Any UI where readable time improves clarity


How It Works

The component compares a given DateTime with the current system time and calculates the difference.
Based on the duration, it returns a meaningful text representation instead of a raw timestamp.

Example outputs:

  • Just now

  • 3 minutes ago

  • Yesterday

  • In 2 days

  • 5 months ago