Date bug
This commit is contained in:
parent
b673e99f73
commit
88003892a0
@ -155,44 +155,48 @@ public class Person
|
||||
log.Information("Enter persons birthday month (press enter if not known) [MMMM || MMM || MM || M]");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (!string.IsNullOrEmpty(line))
|
||||
if (string.IsNullOrEmpty(line))
|
||||
{
|
||||
log.Information("Enter persons approximate age");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
|
||||
continue;
|
||||
approximateYears = line;
|
||||
}
|
||||
else
|
||||
{
|
||||
month = line;
|
||||
else
|
||||
{
|
||||
log.Information("Enter persons approximate age");
|
||||
log.Information("Enter persons birthday day (press enter if not known)");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
|
||||
continue;
|
||||
approximateYears = line;
|
||||
}
|
||||
log.Information("Enter persons birthday day (press enter if not known)");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (!string.IsNullOrEmpty(line))
|
||||
day = line;
|
||||
else
|
||||
{
|
||||
log.Information("Enter persons approximate age");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
|
||||
continue;
|
||||
approximateYears = line;
|
||||
}
|
||||
log.Information("Enter persons birthday year (press enter if not known)");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (!string.IsNullOrEmpty(line))
|
||||
year = line;
|
||||
else
|
||||
{
|
||||
log.Information("Enter persons approximate age");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
|
||||
continue;
|
||||
approximateYears = line;
|
||||
if (string.IsNullOrEmpty(line))
|
||||
{
|
||||
log.Information("Enter persons approximate age");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
|
||||
continue;
|
||||
approximateYears = line;
|
||||
}
|
||||
else
|
||||
{
|
||||
day = line;
|
||||
log.Information("Enter persons birthday year (press enter if not known)");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (!string.IsNullOrEmpty(line))
|
||||
year = line;
|
||||
else
|
||||
{
|
||||
log.Information("Enter persons approximate age");
|
||||
line = System.Console.ReadLine();
|
||||
log.Information(". . .");
|
||||
if (string.IsNullOrEmpty(line) || !int.TryParse(line, out _))
|
||||
continue;
|
||||
approximateYears = line;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (month is null || day is null || year is null)
|
||||
dateTime = null;
|
||||
|
@ -77,7 +77,7 @@
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"MaxDegreeOfParallelism": 6,
|
||||
"MaxDegreeOfParallelism": 1,
|
||||
"Serilog": {
|
||||
"Using": [
|
||||
"Serilog.Sinks.Console",
|
||||
|
Loading…
x
Reference in New Issue
Block a user