Days between dates: Difference between revisions
Content deleted Content added
Line 211: | Line 211: | ||
There are 272 days between 2019-01-01 and 2019-09-30 |
There are 272 days between 2019-01-01 and 2019-09-30 |
||
There are 274 days between 2015-12-31 and 2016-09-30 |
There are 274 days between 2015-12-31 and 2016-09-30 |
||
</pre> |
|||
=={{header|Julia}}== |
|||
<lang julia>using Dates |
|||
@show Day(DateTime("2019-09-30") - DateTime("2019-01-01")) |
|||
@show Day(DateTime("2019-03-01") - DateTime("2019-02-01")) |
|||
@show Day(DateTime("2020-03-01") - DateTime("2020-02-01")) |
|||
@show Day(DateTime("2029-03-29") - DateTime("2019-03-29")) |
|||
</lang>{{out}} |
|||
<pre> |
|||
Day(DateTime("2019-09-30") - DateTime("2019-01-01")) = 272 days |
|||
Day(DateTime("2019-03-01") - DateTime("2019-02-01")) = 28 days |
|||
Day(DateTime("2020-03-01") - DateTime("2020-02-01")) = 29 days |
|||
Day(DateTime("2029-03-29") - DateTime("2019-03-29")) = 3653 days |
|||
</pre> |
</pre> |
||