Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #303 from aspriddell/remove-1-day-offset
Browse files Browse the repository at this point in the history
remove 1 day end offset
  • Loading branch information
aspriddell authored Mar 31, 2022
2 parents 290dc1f + 9fd0307 commit 86d2962
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions DragonFruit.Six.Api/Modern/ModernStatsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static class ModernStatsExtensions
/// <param name="playlistType">The <see cref="PlaylistType"/> to get stats for</param>
/// <param name="operatorType">The <see cref="OperatorType"/> to filter stats by</param>
/// <param name="startDate">The first day to return stats for. Must be within the last 120 days</param>
/// <param name="endDate">The last day to include stats for. Must be at least 1 day before current UTC time</param>
/// <param name="endDate">The last day to include stats for.</param>
/// <param name="token">Optional <see cref="CancellationToken"/></param>
/// <returns>A container with the requested map stats. Will return null if no stats found</returns>
[CanBeNull]
Expand All @@ -54,7 +54,7 @@ public static Task<ModernModeStatsContainer<IEnumerable<ModernMapStats>>> GetMod
/// <param name="playlistType">The <see cref="PlaylistType"/> to get stats for</param>
/// <param name="operatorType">The <see cref="OperatorType"/> to filter stats by</param>
/// <param name="startDate">The first day to return stats for. Must be within the last 120 days</param>
/// <param name="endDate">The last day to include stats for. Must be at least 1 day before current UTC time</param>
/// <param name="endDate">The last day to include stats for.</param>
/// <param name="token">Optional <see cref="CancellationToken"/></param>
/// <returns>A container with the requested operator stats. Will return null if no stats found</returns>
[CanBeNull]
Expand Down Expand Up @@ -101,7 +101,7 @@ public static Task<ModernModeStatsContainer<IEnumerable<ModernSeasonStats>>> Get
/// <param name="playlistType">The <see cref="PlaylistType"/> to get stats for</param>
/// <param name="operatorType">The <see cref="OperatorType"/> to filter stats by</param>
/// <param name="startDate">The first day to return stats for. Must be within the last 120 days</param>
/// <param name="endDate">The last day to include stats for. Must be at least 1 day before current UTC time</param>
/// <param name="endDate">The last day to include stats for.</param>
/// <param name="token">Optional <see cref="CancellationToken"/></param>
/// <returns>A container with the requested stats. Will return null if no stats found.</returns>
/// <remarks>This returns a collection of <see cref="ModernStatsSummary"/> items, but is recommended to use FirstOrDefault() to get the correct stats object</remarks>
Expand Down Expand Up @@ -129,7 +129,7 @@ public static Task<ModernModeStatsContainer<IEnumerable<ModernStatsSummary>>> Ge
/// <param name="playlistType">The <see cref="PlaylistType"/> to get stats for</param>
/// <param name="operatorType">The <see cref="OperatorType"/> to filter stats by</param>
/// <param name="startDate">The first day to return stats for. Must be within the last 120 days</param>
/// <param name="endDate">The last day to include stats for. Must be at least 1 day before current UTC time</param>
/// <param name="endDate">The last day to include stats for.</param>
/// <param name="token">Optional <see cref="CancellationToken"/></param>
/// <returns>A container with the data needed to plot the graphs seen on the ubisoft stats site. Will return null if no stats found</returns>
[CanBeNull]
Expand Down Expand Up @@ -157,7 +157,7 @@ public static Task<ModernModeStatsContainer<IEnumerable<ModernStatsTrend>>> GetM
/// <param name="playlistType">The <see cref="PlaylistType"/> to get stats for</param>
/// <param name="operatorType">The <see cref="OperatorType"/> to filter stats by</param>
/// <param name="startDate">The first day to return stats for. Must be within the last 120 days</param>
/// <param name="endDate">The last day to include stats for. Must be at least 1 day before current UTC time</param>
/// <param name="endDate">The last day to include stats for.</param>
/// <param name="token">Optional <see cref="CancellationToken"/></param>
/// <returns>A container with the requested weapon stats. Will return null if no stats found</returns>
[CanBeNull]
Expand Down
2 changes: 1 addition & 1 deletion DragonFruit.Six.Api/Modern/Requests/ModernStatsRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public virtual DateTimeOffset StartDate
/// <exception cref="ArgumentOutOfRangeException">The date provided is in the future</exception>
public virtual DateTimeOffset EndDate
{
get => _endDate ??= DateTimeOffset.UtcNow.AddDays(-1);
get => _endDate ??= DateTimeOffset.UtcNow;
set
{
if (DateTimeOffset.UtcNow.Date > value.Date)
Expand Down

0 comments on commit 86d2962

Please sign in to comment.