Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-25 Thread Stephane Ducasse
Thanks you all for this discussion. Last time I used Date and friends I got really frustrated. The navigation between the concept was not really good. I needed for example to manipulate a month in a year: February 2017 (I should check what I did). If I would have time and money I would - create a m

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-25 Thread Alistair Grant
On 16 November 2017 at 20:23, Pavel Krivanek wrote: > I openend an issue: > https://pharo.fogbugz.com/f/cases/20700/translateToUTC-does-not-work-on-Month-and-Year > > Thank you for reporting > -- Pavel PR: https://github.com/pharo-project/pharo/pull/545 Cheers, Alistair > 2017-11-16 18:36 GMT+

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-25 Thread Alistair Grant
On 21 November 2017 at 18:07, Alistair Grant wrote: > > If I don't hear back in a couple of days I'll submit a PR (with > automated tests). Thanks to Ben, Benoit and Sven for their input. I ended up using #equals: as suggested by Sven. I'd thought of this and had originally rejected it due to i

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-21 Thread Ben Coman
On 22 November 2017 at 01:07, Alistair Grant wrote: > On 20 November 2017 at 09:16, Sven Van Caekenberghe wrote: > > > > We can discuss about this ad infinitum. I think we all agree that > > there are 2 views (abstract calendar date and concrete time > > interval/span, which requires a TZ), as w

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-21 Thread Benoit St-Jean via Pharo-users
adius zero".  (A. Einstein) From: Sean P. DeNigris To: pharo-users@lists.pharo.org Sent: Tuesday, November 21, 2017 9:14 PM Subject: Re: [Pharo-users] Timespan translateToUTC problematic Pharo Smalltalk Users mailing list wrote > #hasSameDayAs: - Wouldn'

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-21 Thread Sean P. DeNigris
Pharo Smalltalk Users mailing list wrote > #hasSameDayAs: - Wouldn't that be #isSameDayAs:? - Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-21 Thread Benoit St-Jean via Pharo-users
. Einstein) From: Alistair Grant To: Any question about pharo is welcome Sent: Tuesday, November 21, 2017 12:07 PM Subject: Re: [Pharo-users] Timespan translateToUTC problematic On 20 November 2017 at 09:16, Sven Van Caekenberghe wrote: > > We can discuss about this ad infinitum

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-21 Thread Sven Van Caekenberghe
> On 21 Nov 2017, at 18:07, Alistair Grant wrote: > > On 20 November 2017 at 09:16, Sven Van Caekenberghe wrote: >> >> We can discuss about this ad infinitum. I think we all agree that >> there are 2 views (abstract calendar date and concrete time >> interval/span, which requires a TZ), as we

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-21 Thread Alistair Grant
On 20 November 2017 at 09:16, Sven Van Caekenberghe wrote: > > We can discuss about this ad infinitum. I think we all agree that > there are 2 views (abstract calendar date and concrete time > interval/span, which requires a TZ), as well as 2 possible ways to > deal with the second case (TZ inside

Re: [Pharo-users] Timespan translateToUTC problematic (Alistair Grant)

2017-11-20 Thread Richard A. O'Keefe
From: Alistair Grant I think that there's still use for representing a date as a timespan, i.e. a 24 hour period that we can use to find the intersection of times, etc (in addition to adding a timezone offset to a DateTime to figure out the date in a different country). Whether it needs to

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-20 Thread Pavel Krivanek
In any case, we have an issue because the behavior of the Date and Month is different -- Pavel 2017-11-20 9:16 GMT+01:00 Sven Van Caekenberghe : > > > > On 20 Nov 2017, at 07:58, Alistair Grant wrote: > > > > On 18 November 2017 at 18:38, Sven Van Caekenberghe > wrote: > >> > >> > >>> On 18 No

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-20 Thread Sven Van Caekenberghe
> On 20 Nov 2017, at 07:58, Alistair Grant wrote: > > On 18 November 2017 at 18:38, Sven Van Caekenberghe wrote: >> >> >>> On 18 Nov 2017, at 17:46, Alistair Grant wrote: >>> >>> On 17 November 2017 at 14:44, Sven Van Caekenberghe wrote: Both interpretation are correct and valid, it

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-19 Thread Alistair Grant
On 20 November 2017 at 08:30, Ben Coman wrote: > I don't ponder much on Dates, DateTimes etc, but I just had one interesting > image flash through my head > and was curious how correct it sounds, or if I'm completely off base. > > So who remembers the old arcade game "Moon Buggy" ? > https://www.y

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-19 Thread Ben Coman
On 20 November 2017 at 14:58, Alistair Grant wrote: > On 18 November 2017 at 18:38, Sven Van Caekenberghe wrote: > > > > > >> On 18 Nov 2017, at 17:46, Alistair Grant wrote: > >> > >> On 17 November 2017 at 14:44, Sven Van Caekenberghe > wrote: > >>> Both interpretation are correct and valid,

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-19 Thread Ben Coman
I don't ponder much on Dates, DateTimes etc, but I just had one interesting image flash through my head and was curious how correct it sounds, or if I'm completely off base. So who remembers the old arcade game "Moon Buggy" ? https://www.youtube.com/watch?v=6EptD9Egf7w Now imagine that passing be

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-19 Thread Alistair Grant
On 18 November 2017 at 18:38, Sven Van Caekenberghe wrote: > > >> On 18 Nov 2017, at 17:46, Alistair Grant wrote: >> >> On 17 November 2017 at 14:44, Sven Van Caekenberghe wrote: >>> Both interpretation are correct and valid, it is just hard to capture them >>> with one class. >>> >>> In normal

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-19 Thread David T. Lewis
Richard, That is a very good explanation, and 100% correct. Dave On Mon, Nov 20, 2017 at 12:30:38PM +1300, Richard A. O'Keefe wrote: > I think the fundamental question is what a Date is supposed > to represent. I have spent a LOT of time thinking about date > and time classes over the last 10 y

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-19 Thread Richard A. O'Keefe
I think the fundamental question is what a Date is supposed to represent. I have spent a LOT of time thinking about date and time classes over the last 10 years, and have come to the conclusion that it makes no sense to view a Date as a Timespan. Let's take an example. Christmas this year is goi

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-18 Thread Sven Van Caekenberghe
> On 18 Nov 2017, at 17:46, Alistair Grant wrote: > > On 17 November 2017 at 14:44, Sven Van Caekenberghe wrote: >> Both interpretation are correct and valid, it is just hard to capture them >> with one class. >> >> In normal human conversation and in the abstract, of course a date is just a

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-18 Thread Alistair Grant
On 17 November 2017 at 14:44, Sven Van Caekenberghe wrote: > Both interpretation are correct and valid, it is just hard to capture them > with one class. > > In normal human conversation and in the abstract, of course a date is just a > year/month/date triple. But that is because most people onl

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-17 Thread Sven Van Caekenberghe
Both interpretation are correct and valid, it is just hard to capture them with one class. In normal human conversation and in the abstract, of course a date is just a year/month/date triple. But that is because most people only look at this from their own perspective. However, from an internat

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-17 Thread Peter Uhnák
Because Date has, by definition, no concept of time. The only reason why you see it is because someone decided to save a bit of time and reuse implementation. If you want to move TZ, you need something that _has_ time. Such as DateAndTime. You can also read the comments ... Date > Instances of D

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-17 Thread Prof. Andrew P. Black
> On 17 Nov 2017, at 08:49 , Peter Uhnák wrote: > > I find the concept of translating TZ of a Date silly. The real bug imho > should be that it prints both time and TZ this is Date, not DateAndTime. > I live in Oregon, and frequently work with people in New Zealand, which is (depending o

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-17 Thread Sven Van Caekenberghe
Hmm, in Pharo 7 I see this: TimeZone local. => a LocalTimeZone(LT1:00) { Date today. Date today translateToUTC. Month month: 6 year: 2015. (Month month: 6 year: 2015) translateToUTC } collect: [ :each | each printString -> each start ]. => an Array( '17 November 2017'->2017-11-17T00:00

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-16 Thread Peter Uhnák
I find the concept of translating TZ of a Date silly. The real bug imho should be that it prints both time and TZ this is Date, not DateAndTime. Peter On Thu, Nov 16, 2017 at 8:23 PM, Pavel Krivanek wrote: > I openend an issue: https://pharo.fogbugz.com/f/cases/20700/ > translateToUTC-does-

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-16 Thread Pavel Krivanek
I openend an issue: https://pharo.fogbugz.com/f/cases/20700/translateToUTC-does-not-work-on-Month-and-Year Thank you for reporting -- Pavel 2017-11-16 18:36 GMT+01:00 Trussardi Dario Romano < dario.trussa...@tiscali.it>: > Ciao, > > i have a Pharo 4.0 image run on macbook with time zone

[Pharo-users] Timespan translateToUTC problematic

2017-11-16 Thread Trussardi Dario Romano
Ciao, i have a Pharo 4.0 image run on macbook with time zone is set to Rome +1 UTC . When i send the translateToUTC to Date instance it is ok: Date today > 2017-11-16T00:00:00+01:00 Date today translateToUTC > 2017-11-16T00:00: