Code/Entities/Social/RatingDataPoint.cs

Simple data model representing a single rating data point with a Date and an integer Rating. The constructor accepts year, month (0-based) and day, constructs a DateTime (adds 1 to month), and stores the rating.

🐞 Constructor adds 1 to the supplied month then calls new DateTime(year, month + 1, day), so normal 1-based inputs shift the month and month 12 throws ArgumentOutOfRangeException.
#nullable enable annotations

namespace LichessNET.Entities.Social;

public class RatingDataPoint
{
    public RatingDataPoint(int year, int month, int day, int rating)
    {
        Date = new DateTime(year, month + 1, day);
        Rating = rating;
    }

    public DateTime Date { get; set; }
    public int Rating { get; set; }
}