diff --git a/GeneGenie.Gedcom/GedcomDate.cs b/GeneGenie.Gedcom/GedcomDate.cs index eeb416d..cb9a8c7 100644 --- a/GeneGenie.Gedcom/GedcomDate.cs +++ b/GeneGenie.Gedcom/GedcomDate.cs @@ -30,6 +30,7 @@ namespace GeneGenie.Gedcom /// public class GedcomDate : GedcomRecord { + // TODO: Organize this list of private class members a bit differently once I fully understand the usage of this class private GedcomDateType dateType; private GedcomDatePeriod datePeriod; @@ -48,6 +49,7 @@ public class GedcomDate : GedcomRecord /// public GedcomDate() { + // TODO: Why initialize the two date1/date2 strings but leave everything else? date1 = string.Empty; date2 = string.Empty; } @@ -136,8 +138,9 @@ public string Time } /// - /// Gets or sets the date, or the first date in a date range. + /// Gets or sets /// + /// TODO: Doc public string Date1 { get @@ -157,16 +160,18 @@ public string Date1 } /// - /// Gets the DateTime, or the first DateTime in a date range. - /// + /// + /// Gets + /// TODO: Doc public DateTime? DateTime1 { get { return dateTime1; } } /// - /// Gets or sets the second date in a date range. - /// + /// + /// Gets or sets + /// TODO: Doc public string Date2 { get @@ -186,8 +191,9 @@ public string Date2 } /// - /// Gets the second DateTime in a date range. + /// Gets /// + /// TODO: Doc public DateTime? DateTime2 { get { return dateTime2; } @@ -288,12 +294,13 @@ public string Period /// /// Compare two dates to see if first is greater than the second. /// - /// First date to compare. - /// Second date to compare. + /// First date to compare. + /// Second date to compare. /// bool - public static bool operator <(GedcomDate a, GedcomDate b) + public static bool operator <(GedcomDate firstDateToCompare, GedcomDate secondDateToCompare) { - int ret = CompareByDate(a, b); + + int ret = CompareByDate(firstDateToCompare, secondDateToCompare); return ret < 0; } @@ -350,23 +357,23 @@ public string Period /// /// Compare two GEDCOM format dates. /// - /// First date to compare. - /// Second date to compare. + /// First date to compare. + /// Second date to compare. /// 0 if equal, -1 if datea less than dateb, else 1. - public static int CompareByDate(GedcomDate datea, GedcomDate dateb) + public static int CompareByDate(GedcomDate firstDateToCompare, GedcomDate secondDateToCompare) { - int ret = CompareNullableDateTime(datea.DateTime1, dateb.DateTime1); + int ret = CompareNullableDateTime(firstDateToCompare.DateTime1, secondDateToCompare.DateTime1); if (ret == 0) { - ret = CompareNullableDateTime(datea.DateTime2, dateb.DateTime2); + ret = CompareNullableDateTime(firstDateToCompare.DateTime2, secondDateToCompare.DateTime2); if (ret == 0) { - ret = string.Compare(datea.Date1, dateb.Date1, true); + ret = string.Compare(firstDateToCompare.Date1, secondDateToCompare.Date1, true); if (ret == 0) { - ret = string.Compare(datea.Date2, dateb.Date2, true); + ret = string.Compare(firstDateToCompare.Date2, secondDateToCompare.Date2, true); } } } diff --git a/GeneGenie.Gedcom/project.json b/GeneGenie.Gedcom/project.json new file mode 100755 index 0000000..10702cf --- /dev/null +++ b/GeneGenie.Gedcom/project.json @@ -0,0 +1,21 @@ +{ + "version": "1.0.0-*", + "buildOptions": { + "debugType": "portable", + "emitEntryPoint": true + }, + "dependencies": { + "NodaTime": "2.0.0-alpha20160729" + }, + "frameworks": { + "netcoreapp1.0": { + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.1" + } + }, + "imports": "dnxcore50" + } + } +} \ No newline at end of file