Skip to content

Commit

Permalink
chore: humanize date
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Oct 31, 2023
1 parent cd3c5e9 commit fcd969a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/sora_builder/lib/actions/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ $seperator ${data.map((final Map<String, String> x) => cols.keys.map((final Stri
return '''
# 👨‍⚕️ Modules Checkup
Last checked at ${DateTime.now().toUtc().toString().replaceFirst(r'\.\d+Z', '')} (UTC).
Last checked at ${_humanizeDate(DateTime.now().toUtc())} (UTC).
## Anime
Expand All @@ -211,3 +211,6 @@ $mangaTable
''';
}
}

String _humanizeDate(final DateTime date) =>
date.toString().replaceFirst(RegExp(r'\.\d+Z$'), '');

0 comments on commit fcd969a

Please sign in to comment.