time_formatter 1.0.0+5 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.
import 'package:time_formatter/time_formatter.dart';
String formatted = formatTime(
DateTime.now().subtract(Duration(hours: 2)).millisecondsSinceEpoch);
void main() {
print(formatted);
// 2 hours
}