year method
Print amount
years for the corresponding locale. The unit is abbreviated
if abbreviated
is set to true.
Implementation
@override
String year(int amount, [bool abbreviated = true]) {
if (abbreviated) {
return 'ع';
} else {
if (amount == 1) {
return 'عام';
} else if (amount == 2) {
return 'عامين';
} else if (amount > 2 && amount < 11) {
return 'أعوام';
} else if (amount > 10) {
return 'عام';
}
return 'أعوام';
}
}