Skip to content

Instantly share code, notes, and snippets.

@hydrangeas
Created May 19, 2020 14:18
Show Gist options
  • Save hydrangeas/3b7d9ff6199bea2fae806c444266e268 to your computer and use it in GitHub Desktop.
Save hydrangeas/3b7d9ff6199bea2fae806c444266e268 to your computer and use it in GitHub Desktop.
using System;
using System.Globalization;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
var now = new DateTime(2020, 5, 23);
var random = new Random();
for(var i = 0; i < 48*7; i++)
{
Console.WriteLine(
$"{{" +
$" \"Date\": \"{now.AddDays(-1 * i).ToString("yyyy/MM/dd")}\"," +
$" \"DayOfWeek\": \"{now.AddDays(-1 * i).ToString("ddd", new CultureInfo("en-US"))}\"," +
$" \"Data\": {random.Next(50, 200)}" +
$" }},"
);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment