Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
arman-g authored Sep 24, 2021
1 parent 49b9110 commit d69fd7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ public void PrintAge()
// Example 1
var dob = DateTime.Parse("02/29/2016");
var toDay = DateTime.Parse("02/28/2021");
var age = new Age(dob, toDay, true); // <- Switch the flag ON. Default is Off.
var age = new Age(dob, toDay, true); // <- Switch the flag ON. Default is OFF.
Console.WriteLine($"Example 1 - Age: {age.Years} years, {age.Months} months, {age.Days} days, {age.Time}");

// Example 2
dob = DateTime.Parse("02/29/2016");
toDay = DateTime.Parse("02/28/2021 00:00:01");
age = dob.CalculateAge(toDay, true); // <- Switch the flag ON. Default is Off.
age = dob.CalculateAge(toDay, true); // <- Switch the flag ON. Default is OFF.
Console.WriteLine($"Example 2 - Age: {age.Years} years, {age.Months} months, {age.Days} days, {age.Time}");

// Example 3
dob = DateTime.Parse("02/29/2016 00:00:02");
toDay = DateTime.Parse("02/28/2021 00:00:01");
age = Age.Calculate(dob, toDay, true); // <- Switch the flag ON. Default is Off.
age = Age.Calculate(dob, toDay, true); // <- Switch the flag ON. Default is OFF.
Console.WriteLine($"Example 3 - Age: {age.Years} years, {age.Months} months, {age.Days} days, {age.Time}");
}

Expand Down

0 comments on commit d69fd7a

Please sign in to comment.