[Pharo-project] Issue 3604 in pharo: Timespan created from Date>>to: missing last date

pharo at googlecode.com pharo at googlecode.com
Thu Jan 27 22:20:37 CET 2011


Status: New
Owner: ----

New issue 3604 by edoua... at gmail.com: Timespan created from Date>>to:  
missing last date
http://code.google.com/p/pharo/issues/detail?id=3604

We are currently working on version 1.2, so please verify your issue with
the latest 1.2 Unstable version  before reporting it - we improved a lot
the system.

If you fill an issue for the first time, please read "How to report bugs"
at http://www.pharo-project.org/community/issue-tracking

Pharo image: Pharo-core
Pharo core version: 1.2-12324
Virtual machine used: Mac OS X Squeak 4.2.2beta1U


Simplest version
-------------
(Date today to Date today) includes: Date today. " false "
vs
(5 to: 5) includes: 5. " true "

Another version
------------
timespan := (Date year: 2011 month: #January day: 23) to: (Date year: 2011  
month: #January day: 28).
timespan end. " 2011-01-27T23:59:59.999999999+13:00 "

My particular problem was with the following (but the root cause is the  
same)
------------------------------------------------------------
range := Date today - 5 days to: Date today.
range dates detect: [ :day | day = Date today ] ifNone: [ nil ]. " nil "








More information about the Pharo-project mailing list