time_formatter 1.0.0+5 copy "time_formatter: ^1.0.0+5" to clipboard
time_formatter: ^1.0.0+5 copied to clipboard

Format UNIX timestamps into human-readable strings in Dart; inspired by YouTube's time formatting habits.

example/example.dart

import 'package:time_formatter/time_formatter.dart';

String formatted = formatTime(
    DateTime.now().subtract(Duration(hours: 2)).millisecondsSinceEpoch);

void main() {
  print(formatted);
  // 2 hours
}
38
likes
30
pub points
74%
popularity

Publisher

unverified uploader

Format UNIX timestamps into human-readable strings in Dart; inspired by YouTube's time formatting habits.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

More

Packages that depend on time_formatter