Function timeAgo

  • Converting Jalali date-time into a time ago.

    Parameters

    • datetime: string = ""

      Format must be yyyy/mm/dd hh:mm:ss. If no value is entered for input, the current time is considered.

    Returns string

    Return time ago value. Eg: حدود 1 سال قبل