Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Embedded C# Pad code example</title>
</head>
<body>
<pre>
<code class="codepad language-csharp" data-codepad="theme:cobalt" style="width:100%;height:400px;" >//
// This program shows how long ago C# Pad (http://www.csharppad.com) was released.
var releaseDate = new DateTime(2014, 2, 26, 6, 15, 0, DateTimeKind.Utc);
var span = DateTime.UtcNow - releaseDate;
Console.WriteLine("It's been {0} years, {1} months, {2} days, {3} hours, {4} minutes, {5} seconds since C# Pad was released!",
Math.Floor(span.Days / 365.25f), Math.Floor((span.Days % 365.25f) / 30f), (span.Days % 365.25f) % 30f, span.Hours, span.Minutes, span.Seconds  )
</code>
</pre>
<script src="//csharppad.com/embed.js"></script>
<script type="text/javascript"> Codepad.all(); </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
tenorpro
0viewers