time_diffrence 0.0.2 copy "time_diffrence: ^0.0.2" to clipboard
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.

example/example.dart

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
}
3
likes
130
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

This package allows you to convert DateTime formate diffrence in a words like Tommorow, Today, yesterday , 1 day ago and so on.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, intl

More

Packages that depend on time_diffrence