feat : location details
This commit is contained in:
@@ -12,15 +12,24 @@ extension XString on String {
|
||||
return replaceAll(RegExp(r'\D'), '');
|
||||
}
|
||||
|
||||
String get addCountEXT {
|
||||
return '$thisعدد';
|
||||
}
|
||||
String get addDayEXT {
|
||||
return '$thisروزه';
|
||||
}
|
||||
|
||||
get toDateTime => DateTime.parse(this);
|
||||
String get addKgEXT {
|
||||
return '$thisکیلوگرم';
|
||||
}
|
||||
|
||||
DateTime get toDateTime => DateTime.parse(this);
|
||||
|
||||
String get formattedJalaliDate {
|
||||
String tmp = contains("/") ? replaceAll("/", "-") : this;
|
||||
final dateTime = DateTime.parse(tmp);
|
||||
final jalaliDate = Jalali.fromDateTime(dateTime);
|
||||
return "${jalaliDate.year}/${jalaliDate.month.toString().padLeft(2, '0')}/${jalaliDate.day.toString().padLeft(2, '0')}";
|
||||
|
||||
}
|
||||
|
||||
String get formattedJalaliDateYHMS {
|
||||
@@ -33,10 +42,10 @@ extension XString on String {
|
||||
return DateFormat('yyyy-MM-dd HH:mm:ss').format(toDateTime);
|
||||
}
|
||||
|
||||
Jalali get toJalali{
|
||||
Jalali get toJalali {
|
||||
final dateTime = DateTime.parse(this);
|
||||
return Jalali.fromDateTime(dateTime);
|
||||
}
|
||||
|
||||
int get versionNumber => int.parse(replaceAll(".",''));
|
||||
}
|
||||
int get versionNumber => int.parse(replaceAll(".", ''));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user