Days between dates: Difference between revisions

Content added Content deleted
(add PicoLisp)
(Frink)
Line 718: Line 718:
273
273
</pre>
</pre>

=={{header|Frink}}==
Frink handles dates and intervals between dates robustly, including time zones. The sample below could use <CODE>minutes</CODE> or <CODE>seconds</CODE> instead of <CODE>days</CODE>.

Frink can even track leap seconds as they are added to the calendar if desired. The code <CODE>d1-d2</CODE> in the sample below could be replaced by <CODE>subtractLeap[d1,d2]</CODE> to obtain exact counts of seconds between dates.

See Frink's [https://frinklang.org/#DateTimeHandling Date/Time Handling] documentation to see how easy it is to work with dates, times, timezones, calendrical systems, and even leap seconds correctly and easily.

<lang frink>d1 = # 2020-12-25 #
d2 = # 2020-12-06 #
println[d1-d2 -> days]</lang>

{{out}}
<pre>19
</pre>




=={{header|Go}}==
=={{header|Go}}==