Can-remap
This commit is contained in:
@ -16,6 +16,9 @@ public interface IPersonBirthday
|
||||
static bool IsCounterPersonBirthday(Models.PersonBirthday personBirthday) =>
|
||||
personBirthday.Value.Year < 1809;
|
||||
|
||||
static bool IsCounterPersonYear(long personKey) =>
|
||||
new DateTime(personKey).Year < 1809;
|
||||
|
||||
static bool IsCounterPersonYear(int year) =>
|
||||
year < 1809;
|
||||
|
||||
|
@ -3,11 +3,11 @@ namespace View_by_Distance.Shared.Models.Stateless.Methods;
|
||||
public interface ISortingContainer
|
||||
{ // ...
|
||||
|
||||
Models.SortingContainer[] TestStatic_Sort(List<Models.SortingContainer> collection) =>
|
||||
List<Models.SortingContainer> TestStatic_Sort(List<Models.SortingContainer> collection) =>
|
||||
Sort(collection);
|
||||
static Models.SortingContainer[] Sort(List<Models.SortingContainer> collection) =>
|
||||
(from l in collection orderby l.Sorting.DistancePermyriad select l).ToArray();
|
||||
static Models.SortingContainer[] SortUsingDaysDelta(List<Models.SortingContainer> collection) =>
|
||||
(from l in collection orderby l.Sorting.DistancePermyriad, l.Sorting.DaysDelta select l).ToArray();
|
||||
static List<Models.SortingContainer> Sort(List<Models.SortingContainer> collection) =>
|
||||
(from l in collection orderby l.Sorting.DistancePermyriad select l).ToList();
|
||||
static List<Models.SortingContainer> SortUsingDaysDelta(List<Models.SortingContainer> collection) =>
|
||||
(from l in collection orderby l.Sorting.DistancePermyriad, l.Sorting.DaysDelta select l).ToList();
|
||||
|
||||
}
|
@ -15,8 +15,8 @@ internal abstract class Sorting
|
||||
TimeSpan timeSpan = new(faceDistanceLength.DateTimeOriginalThenMinimumDateTime.Ticks - faceDistanceEncoding.DateTimeOriginalThenMinimumDateTime.Ticks);
|
||||
bool older = timeSpan.TotalMilliseconds < 0;
|
||||
int daysDelta = (int)Math.Round(Math.Abs(timeSpan.TotalDays), 0);
|
||||
bool? canReMap = faceDistanceLength.MappingFromFilterPost?.CanReMap;
|
||||
int distancePermyriad = (int)(faceDistanceLength.Length.Value * faceDistancePermyriad);
|
||||
bool canReMap = faceDistanceLength.MappingFromFilterPost?.CanReMap is not null && faceDistanceLength.MappingFromFilterPost.CanReMap.Value;
|
||||
result = new(canReMap, daysDelta, distancePermyriad, faceDistanceLength.Id.Value, older, faceDistanceLength.WholePercentages.Value);
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user