dates snippets

julian dates

usually I use iso


but sometimes i like to use julian


or simplly have a flat folder for a journal for example with files named with the day number 1-365 or use week numbers for folders 1-52 and I have some shell and python scripts that do this

julian date in c#

your age in days etc.

using System;

public class Program
    public static void Main()
    Console.Write("Please Enter Your Birthday ex 5-10-2000");
    DateTime userBirthday = DateTime.Parse(Console.ReadLine());
    TimeSpan userAge = DateTime.Now.Subtract(userBirthday);
    Console.WriteLine("Here Your Info : " );
    Console.WriteLine("Your Total Days : " + userAge.TotalDays);
    Console.WriteLine("Your Total Hours : " + userAge.TotalHours);
    Console.WriteLine("Your Total Miutes : " + userAge.TotalMinutes);