Browse Source
Merge pull request #7977 from tehtko/master
refactor DiscardDayTime method
pull/7984/head
Jumar Macato
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
4 deletions
-
src/Avalonia.Controls/Calendar/DateTimeHelper.cs
|
|
|
@ -68,10 +68,7 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
public static DateTime DiscardDayTime(DateTime d) |
|
|
|
{ |
|
|
|
int year = d.Year; |
|
|
|
int month = d.Month; |
|
|
|
DateTime newD = new DateTime(year, month, 1, 0, 0, 0); |
|
|
|
return newD; |
|
|
|
return new DateTime(d.Year, d.Month, 1, 0, 0, 0); |
|
|
|
} |
|
|
|
|
|
|
|
[return: NotNullIfNotNull("d")] |
|
|
|
|