Days between dates: Difference between revisions

Realize in F#
(Realize in F#)
Line 825:
|}
 
=={{header|F_Sharp|F#}}==
<lang fsharp>
// Days between dates: Nigel Galloway. June 3rd., 2021
let n,g=System.DateTime.Parse("1792-9-22"),System.DateTime.Parse("1805-12-31")
printfn "There are %d days between %d-%d-%d and %d-%d-%d" (g-n).Days n.Year n.Month n.Day g.Year g.Month g.Day
</lang>
{{out}}
<pre>
There are 4847 days between 1792-9-22 and 1805-12-31
</pre>
=={{header|Factor}}==
Factor supports the addition and subtraction of timestamps and durations with the <code>time+</code> and <code>time-</code> words.
2,172

edits