Given a time and the task is to convert timestamp to time ago. The time ago format removes the problem of different time zones conversions. Given below is a function to do the time conversions. In this function, taking the timestamp as an input and then subtract it from the current timestamp to convert it into the time ago format. To make this function, need to define some rules which determine the year, month, date, minutes etc from the remaining date after subtraction.
6 years ago 5 days ago
5 seconds ago
- Convert timestamp to readable date/time in PHP
- Convert date string to timestamp in Python
- Python program to convert time from 12 hour to 24 hour format
- How to check for two timestamp for the same day?
- How to add 24 hours to a unix timestamp in php?
- HTML | DOM timeStamp Event Property
- Convert time from 24 hour clock to 12 hour clock format
- Difference between Seek Time and Transfer Time in Disk Scheduling
- Difference between Arrival Time and Burst Time in CPU Scheduling
- Difference between Turn Around Time (TAT) and Waiting Time (WT) in CPU Scheduling
- Difference between Transfer Time and Disk Access Time in Disk Scheduling
- Difference between Seek Time and Disk Access Time in Disk Scheduling
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.