File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ import 'package:timeago/timeago.dart' as timeago;
2
+
3
+ /// Custom English lookup messages for the timeago package (concise).
4
+ class EnTimeagoMessages implements timeago.LookupMessages {
5
+ @override
6
+ String prefixAgo () => '' ; // No prefix
7
+ @override
8
+ String prefixFromNow () => '' ; // No prefix
9
+ @override
10
+ String suffixAgo () => ' ago' ; // Suffix instead
11
+ @override
12
+ String suffixFromNow () => ' from now' ; // Suffix instead
13
+
14
+ @override
15
+ String lessThanOneMinute (int seconds) => 'now' ;
16
+ @override
17
+ String aboutAMinute (int minutes) => '1m' ;
18
+ @override
19
+ String minutes (int minutes) => '${minutes }m' ;
20
+
21
+ @override
22
+ String aboutAnHour (int minutes) => '1h' ;
23
+ @override
24
+ String hours (int hours) => '${hours }h' ;
25
+
26
+ @override
27
+ String aDay (int hours) => '1d' ;
28
+ @override
29
+ String days (int days) => '${days }d' ;
30
+
31
+ @override
32
+ String aboutAMonth (int days) => '1mo' ;
33
+ @override
34
+ String months (int months) => '${months }mo' ;
35
+
36
+ @override
37
+ String aboutAYear (int year) => '1y' ;
38
+ @override
39
+ String years (int years) => '${years }y' ;
40
+
41
+ @override
42
+ String wordSeparator () => ' ' ;
43
+ }
You can’t perform that action at this time.
0 commit comments