time_diffrence 0.0.2
time_diffrence: ^0.0.2 copied to clipboard
This package allows you to convert DateTime formate diffrence in a words like Tommorow, Today, yesterday , 1 day ago and so on.
import 'package:time_diffrence/time_diffrence.dart';
void main() {
// Set year, month, and day in DateTime format
DateTime exampleDate = DateTime(2023, 5, 15);
// Convert the DateTime to a natural language string
String result = convertToNaturalLanguageDate(exampleDate);
// Print the result
print(result); // Output could be something like "1 month ago" depending on the current date
}