lib: format
This commit is contained in:
@@ -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)' : '');
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user