IsDefault
extraSaveContainer
This commit is contained in:
@ -13,6 +13,18 @@ public interface IPersonBirthday
|
||||
|
||||
// ...
|
||||
|
||||
static bool IsCounterPersonBirthday(Models.PersonBirthday personBirthday) =>
|
||||
personBirthday.Value.Year < 1809;
|
||||
|
||||
static bool IsCounterPersonYear(int year) =>
|
||||
year < 1809;
|
||||
|
||||
static bool IsCounterPersonYear(string year) =>
|
||||
new string[] { year, "1809" }.Min() == year;
|
||||
|
||||
static bool IsWrongYearFilterOrCounterPersonBirthday(bool? isWrongYear, Models.PersonBirthday personBirthday) =>
|
||||
isWrongYear is null || isWrongYear.Value || IsCounterPersonBirthday(personBirthday);
|
||||
|
||||
string TestStatic_GetDateTime(string personKeyFormatted) =>
|
||||
GetDateTime(personKeyFormatted);
|
||||
static string GetDateTime(string personKeyFormatted) =>
|
||||
@ -68,11 +80,6 @@ public interface IPersonBirthday
|
||||
static string GetFormatted(string personBirthdayFormat, long personKey) =>
|
||||
GetFormatted(personBirthdayFormat, GetPersonBirthday(personKey));
|
||||
|
||||
bool TestStatic_IsCounterPersonBirthday(Models.PersonBirthday personBirthday) =>
|
||||
IsCounterPersonBirthday(personBirthday);
|
||||
static bool IsCounterPersonBirthday(Models.PersonBirthday personBirthday) =>
|
||||
PersonBirthday.IsCounterPersonBirthday(personBirthday);
|
||||
|
||||
Models.PersonBirthday TestStatic_GetNextBirthDate(Properties.IStorage storage) =>
|
||||
GetNextBirthDate(storage);
|
||||
static Models.PersonBirthday GetNextBirthDate(Properties.IStorage storage) =>
|
||||
@ -103,11 +110,6 @@ public interface IPersonBirthday
|
||||
static TimeSpan? GetTimeSpan(DateTime minimumDateTime, bool? isWrongYear, Models.PersonBirthday personBirthday) =>
|
||||
PersonBirthday.GetTimeSpan(minimumDateTime, isWrongYear, personBirthday);
|
||||
|
||||
bool TestStatic_IsWrongYearFilterOrCounterPersonBirthday(bool? isWrongYear, Models.PersonBirthday personBirthday) =>
|
||||
IsWrongYearFilterOrCounterPersonBirthday(isWrongYear, personBirthday);
|
||||
static bool IsWrongYearFilterOrCounterPersonBirthday(bool? isWrongYear, Models.PersonBirthday personBirthday) =>
|
||||
PersonBirthday.IsWrongYearFilterOrCounterPersonBirthday(isWrongYear, personBirthday);
|
||||
|
||||
string TestStatic_GetFileFullName(Properties.IStorage storage, string personBirthdayFormat, Models.PersonBirthday personBirthday) =>
|
||||
GetFileFullName(storage, personBirthdayFormat, personBirthday);
|
||||
static string GetFileFullName(Properties.IStorage storage, string personBirthdayFormat, Models.PersonBirthday personBirthday) =>
|
||||
|
@ -24,30 +24,10 @@ internal abstract class PersonBirthday
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static bool IsCounterPersonBirthday(Models.PersonBirthday personBirthday)
|
||||
{
|
||||
bool result;
|
||||
if (personBirthday.Value.Year < 1809)
|
||||
result = true;
|
||||
else
|
||||
result = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static bool IsWrongYearFilterOrCounterPersonBirthday(bool? isWrongYear, Models.PersonBirthday personBirthday)
|
||||
{
|
||||
bool result;
|
||||
if (isWrongYear is null || isWrongYear.Value || IsCounterPersonBirthday(personBirthday))
|
||||
result = true;
|
||||
else
|
||||
result = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static TimeSpan? GetTimeSpan(long minimumDateTimeTicks, bool? isWrongYear, Models.PersonBirthday personBirthday)
|
||||
{
|
||||
TimeSpan? timeSpan;
|
||||
bool isWrongYearFilterOrCounterPersonBirthday = IsWrongYearFilterOrCounterPersonBirthday(isWrongYear, personBirthday);
|
||||
bool isWrongYearFilterOrCounterPersonBirthday = IPersonBirthday.IsWrongYearFilterOrCounterPersonBirthday(isWrongYear, personBirthday);
|
||||
if (isWrongYearFilterOrCounterPersonBirthday)
|
||||
timeSpan = null;
|
||||
else
|
||||
|
Reference in New Issue
Block a user