using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
public static void Main()
var startDate = DateTime.UtcNow;
var finalDate = DateTime.UtcNow.AddDays(364/4);
daysLeft = Math.Ceiling((finalDate - startDate)
decimal proRatePct = (decimal)daysLeft / (decimal)365;
Console.WriteLine("Days Left: " + daysLeft);
Console.WriteLine("pre: " + proRatePct * 100);
decimal dif = (double) (finalDate - startDate).TotalHours / 24 / 365;
Console.WriteLine("dateDiff : " + dif);
Console.WriteLine("final: " + proRatePct * 100);
public static List<List<long>> SplitToSublists(List<long> source, int itemsPerBucket)
if (itemsPerBucket < 0) itemsPerBucket = 1;
.Select((x, i) => new { Index = i, Value = x })
.GroupBy(x => x.Index / itemsPerBucket)
.Select(x => x.Select(v => v.Value).ToList())