time_formatter library
Functions
-
countDays(int difference)
→ String
-
Converts the time difference to a number of days.
This function truncates to the lowest day.
returns ("1 day" OR "X days")
-
countHours(int difference)
→ String
-
Converts the time difference to a number of hours.
This function truncates to the lowest hour.
returns ("1 hour" OR "X hours")
-
countMinutes(int difference)
→ String
-
Converts the time difference to a number of minutes.
This function truncates to the lowest minute.
returns ("1 minute" OR "X minutes")
-
countMonths(int difference)
→ String
-
Converts the time difference to a number of months.
This function rounds to the nearest month.
returns ("1 month" OR "X months" OR "1 year")
-
countSeconds(int difference)
→ String
-
Converts the time difference to a number of seconds.
This function truncates to the lowest second.
returns ("Just now" OR "X seconds")
-
countWeeks(int difference)
→ String
-
Converts the time difference to a number of weeks.
This function truncates to the lowest week.
returns ("1 week" OR "X weeks" OR "1 month")
-
countYears(int difference)
→ String
-
Converts the time difference to a number of years.
This function truncates to the lowest year.
returns ("1 year" OR "X years")
-
formatTime(int timestamp)
→ String
-
Formats a given UNIX millisecond timestamp into a human-readable string. [...]