Skip to main content
added 2 characters in body
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661

C# (Visual C# Interactive Compiler), 186 163 bytes

string f(int[]t){int x,n=(int)(new DateTime(t[0],t[1],t[2])-new DateTime(1,1,1)).TotalDays+1137143;return string.Join(".",new[]{144000,7200,360,20,1}.Select(e=>{x=n/e;n%=e;return x;}));}

Try it online!

Edit: Use int[]int[] as input instead of DateTime to meet the specification better. Thanks @keizerharm for the hint

C# (Visual C# Interactive Compiler), 186 163 bytes

string f(int[]t){int x,n=(int)(new DateTime(t[0],t[1],t[2])-new DateTime(1,1,1)).TotalDays+1137143;return string.Join(".",new[]{144000,7200,360,20,1}.Select(e=>{x=n/e;n%=e;return x;}));}

Try it online!

Edit: Use int[] as input instead of DateTime to meet the specification better. Thanks @keizerharm for the hint

C# (Visual C# Interactive Compiler), 186 163 bytes

string f(int[]t){int x,n=(int)(new DateTime(t[0],t[1],t[2])-new DateTime(1,1,1)).TotalDays+1137143;return string.Join(".",new[]{144000,7200,360,20,1}.Select(e=>{x=n/e;n%=e;return x;}));}

Try it online!

Edit: Use int[] as input instead of DateTime to meet the specification better. Thanks @keizerharm for the hint

Use int[] as input instead of DateTime
Source Link
pocki_c
  • 131
  • 3

C# (Visual C# Interactive Compiler), 186 163 bytes

string f(int[]t){int x,n=(int)(new DateTime(t[0],t[1],t[2])-new DateTime(1,1,1)).TotalDays+1137143;return string.Join(".",new[]{144000,7200,360,20,1}.Select(e=>{x=n/e;n%=e;return x;}));}

Try it online!

Edit: Use int[] as input instead of DateTime to meet the specification better. Thanks @keizerharm for the hint

C# (Visual C# Interactive Compiler), 186 163 bytes

string f(int[]t){int x,n=(int)(new DateTime(t[0],t[1],t[2])-new DateTime(1,1,1)).TotalDays+1137143;return string.Join(".",new[]{144000,7200,360,20,1}.Select(e=>{x=n/e;n%=e;return x;}));}

Try it online!

Edit: Use int[] as input instead of DateTime

C# (Visual C# Interactive Compiler), 186 163 bytes

string f(int[]t){int x,n=(int)(new DateTime(t[0],t[1],t[2])-new DateTime(1,1,1)).TotalDays+1137143;return string.Join(".",new[]{144000,7200,360,20,1}.Select(e=>{x=n/e;n%=e;return x;}));}

Try it online!

Edit: Use int[] as input instead of DateTime to meet the specification better. Thanks @keizerharm for the hint

Use int[] as input instead of DateTime
Source Link
pocki_c
  • 131
  • 3

C# (Visual C# Interactive Compiler), 163186 163 bytes

string f(DateTime tint[]t){int x,n=(int)(tnew DateTime(t[0],t[1],t[2])-new DateTime(1,1,1)).TotalDays+1137143;return string.Join(".",new[]{144000,7200,360,20,1}.Select(e=>{x=n/e;n%=e;return x;}));}

Try it online!Try it online!

Edit: Use int[] as input instead of DateTime

C# (Visual C# Interactive Compiler), 163 bytes

string f(DateTime t){int x,n=(int)(t-new DateTime(1,1,1)).TotalDays+1137143;return string.Join(".",new[]{144000,7200,360,20,1}.Select(e=>{x=n/e;n%=e;return x;}));}

Try it online!

C# (Visual C# Interactive Compiler), 186 163 bytes

string f(int[]t){int x,n=(int)(new DateTime(t[0],t[1],t[2])-new DateTime(1,1,1)).TotalDays+1137143;return string.Join(".",new[]{144000,7200,360,20,1}.Select(e=>{x=n/e;n%=e;return x;}));}

Try it online!

Edit: Use int[] as input instead of DateTime

Source Link
pocki_c
  • 131
  • 3
Loading