time_difference 0.1.3+1 time_difference: ^0.1.3+1 copied to clipboard
Plugin returns time interval as 1 min ago, 2 hours ago, 2 days ago and Dec 20, 2020 for more than 2 days.
A new Flutter project.
Feature of this package #
This project is to find the time elapsed from certain date and represent like Just now, 2 minutes ago and so on similar as facebook status. It takes parameter String format of DateTime.
It returns the date in format as Dec 3, 2020 if the difference is more than 2 days.
The String here is just conversionof DateTime format of DateTime.now() as DateTime.now().toString().
No necessary to convert other formats of DateTime to String because it won't work for other ones.