You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
597 B

class BeeParse {
static int getEstateNameId(String estateName) {
int a = int.parse(estateName.split('|')[0]);
return a;
}
static String getEstateName(String estateNmae) {
return estateNmae.split('|')[1];
}
static String getCustomYears(int year) {
int dif = year - DateTime.now().year;
switch (dif) {
case -1:
return '去年';
break;
case 0:
return '今年';
case 1:
return '明年';
default:
if (dif < 0) return '${-dif}年前';
// } else {
return '$dif年后';
// }
}
}
}