Created
October 29, 2012 11:01
-
-
Save Cynede/3972958 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| open System | |
| let dd = (DateTime.Now - DateTime.Parse("12/09/2012")).Days | |
| let oneday = 7.7 / Convert.ToDouble(dd) | |
| let in10gb = Convert.ToInt32( Math.Round (10.0 * 1024.0 / oneday) ) | |
| let years = Convert.ToInt32( Math.Round (float in10gb / 365.0) ) | |
| let months = Convert.ToInt32( Math.Round (float (in10gb - years * 365) / 30.0) ) | |
| let days = | |
| let d = in10gb - years * 365 - months * 30 | |
| if d > 0 then d else 0 | |
| printf "%d years %d months %d days" years months days | |
| Console.ReadKey() |> ignore |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
171 years 3 months 0 days