lib: format

This commit is contained in:
2025-05-16 21:06:19 +02:00
parent 84ae7eca9e
commit 3f267b78d3
16 changed files with 360 additions and 96 deletions

View File

@@ -289,15 +289,16 @@ extension on DateTime {
}
String get japaneseWeekdayPrefix => [
'',
'',
'',
'',
'',
'',
'',
][weekday - 1];
'',
'',
'',
'',
'',
'',
'',
][weekday - 1];
/// Returns the date in Japanese format.
String japaneseDate({bool showWeekday = false}) => '$month月$day日' + (showWeekday ? '$japaneseWeekdayPrefix' : '');
String japaneseDate({bool showWeekday = false}) =>
'$month月$day日' + (showWeekday ? '$japaneseWeekdayPrefix' : '');
}

View File

@@ -30,7 +30,6 @@ const String rawHiraganaRegex = r'\p{Script=Hiragana}';
/// Remember to turn on the unicode flag when making a new RegExp.
const String rawKanjiRegex = r'[\u3400-\u4DB5\u4E00-\u9FCB\uF900-\uFA6A]';
final RegExp cjkRegex = RegExp(rawCJKRegex, unicode: true);
final RegExp katakanaRegex = RegExp(rawKatakanaRegex, unicode: true);
final RegExp hiraganaRegex = RegExp(rawHiraganaRegex, unicode: true);