Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with dotnet-format #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions System.Polyfills/System/DateOnly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ private DateOnly(int dayNumber)
/// <summary>
/// Gets the earliest possible date that can be created.
/// </summary>
public static DateOnly MinValue => new (MinDayNumber);
public static DateOnly MinValue => new(MinDayNumber);

/// <summary>
/// Gets the latest possible date that can be created.
/// </summary>
public static DateOnly MaxValue => new (MaxDayNumber);
public static DateOnly MaxValue => new(MaxDayNumber);

/// <summary>
/// Creates a new instance of the <see cref="DateOnly"/> structure to the specified year, month, and day.
Expand All @@ -68,7 +68,7 @@ private DateOnly(int dayNumber)
/// <param name="month">The month (1 through 12).</param>
/// <param name="day">The day (1 through the number of days in <paramref name="month"/>).</param>
public DateOnly(int year, int month, int day) =>
_dayNumber = DayNumberFromDateTime(new (year, month, day));
_dayNumber = DayNumberFromDateTime(new(year, month, day));

/// <summary>
/// Creates a new instance of the <see cref="DateOnly"/> structure to the specified year, month, and day for the specified calendar.
Expand All @@ -78,7 +78,7 @@ public DateOnly(int year, int month, int day) =>
/// <param name="day">The day (1 through the number of days in <paramref name="month"/>).</param>
/// <param name="calendar">The calendar that is used to interpret <paramref name="year"/>, <paramref name="month"/>, and <paramref name="day"/>.</param>
public DateOnly(int year, int month, int day, Calendar calendar) =>
_dayNumber = DayNumberFromDateTime(new (year, month, day, calendar));
_dayNumber = DayNumberFromDateTime(new(year, month, day, calendar));

/// <summary>
/// Creates a new instance of the <see cref="DateOnly"/> structure to the specified number of days.
Expand Down Expand Up @@ -160,7 +160,7 @@ static void ThrowOutOfRange() =>
/// <returns>An object whose value is the sum of the date represented by this instance
/// and the number of months represented by <paramref name="value"/>.</returns>
public DateOnly AddMonths(int value) =>
new (DayNumberFromDateTime(GetEquivalentDateTime().AddMonths(value)));
new(DayNumberFromDateTime(GetEquivalentDateTime().AddMonths(value)));

/// <summary>
/// Adds the specified number of years to the value of this instance.
Expand All @@ -169,7 +169,7 @@ public DateOnly AddMonths(int value) =>
/// <returns>An object whose value is the sum of the date represented by this instance
/// and the number of years represented by <paramref name="value"/>.</returns>
public DateOnly AddYears(int value) =>
new (DayNumberFromDateTime(GetEquivalentDateTime().AddYears(value)));
new(DayNumberFromDateTime(GetEquivalentDateTime().AddYears(value)));

/// <summary>
/// Determines whether two specified instances of <see cref="DateOnly"/> are equal.
Expand Down
Loading