Created
May 19, 2020 14:18
-
-
Save hydrangeas/3b7d9ff6199bea2fae806c444266e268 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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