[squeak-dev] Timespan>>datesDo: - is this a bug?
cunningham.cb at gmail.com
Fri May 10 22:24:42 UTC 2019
So, this code:
Date today asMonth datesDo: [:date| Transcript cr; show: date yyyymmdd]
prints out each day in the month. That is what I'd expect.
mth := Date today asMonth.
(mth start asDate to: mth end asDate) datesDo: [:date| Transcript cr;
show: date yyyymmdd]
does not print the last date.
This has bitten me. If I add a nanosecond onto the end date (mth end
asDate + 1) it does include the last date - but that is ugly. And
dangerous if I have other code that carefully picks the following date
start to work around this oddity.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev