Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007255 [Squeak] Kernel feature always 12-30-08 12:25 05-03-13 21:27
Reporter M8R View Status public  
Assigned To FrankShearar
Priority normal Resolution fixed Platform
Status resolved   OS
Projection none   OS Version
ETA none Fixed in Version Product Version
  Product Build
Summary 0007255: Add an #ago message to Duration
Description Saying "10 minutes ago" is easier than "DateAndTime now - 10 minutes."

Duration>>ago

^ DateAndTime now - self
Steps To Reproduce
Additional Information
Attached Files  Duration-ago.st [^] (200 bytes) 01-01-09 16:03
 Duration-fromNow.st [^] (204 bytes) 01-01-09 16:29
 DurationTest-testAgo.st [^] (470 bytes) 01-01-09 16:30
 DurationTest-testFromNow.st [^] (506 bytes) 01-01-09 16:30

- Relationships

- Notes
(0012887 - 455 - 569 - 569 - 569 - 569 - 569)
wiz
12-31-08 21:06

Hi M8R,

To further your cause would you please:

Upload a fileout with the method.

And if you can write a sunit tests to that there is something that fails before and passes after the patch is added.

This could be as simple as

testAgo

self shouldnt: [ 10 minutes ago ] raise: Error .

In a suitably named subclass of TestCase.
Upload the test stuff separately from the fileout.

hth,

Yours in curiosity and service, --Jerome Peace
 
(0012888 - 179 - 201 - 201 - 201 - 201 - 201)
M8R
01-01-09 16:33
edited on: 01-01-09 16:35

Above are the fileOuts of the methods. I also added a #fromNow message to complement #ago, so one can say "5 days fromNow" and it will return the appropriate DateAndTime object.

 
(0014284 - 503 - 536 - 746 - 746 - 746 - 746)
nicolas cellier
01-05-13 01:23

I like this suggestion.

I would have prefered ahead among suggestions from http://english.stackexchange.com/questions/24457/general-purpose-antonym-for-ago [^] but google translates 'two days ahead'->'deux jours avant' which I suddenly find quite ambiguous... Hence was a bit harder (unknown) for me

In french we would say 'il y a deux jours' for past and 'dans deux jours' for future, but prefixing is not Smalltalkish.
So the opinion of a bloody french might not really matters for such subject...
 
(0014357 - 46 - 50 - 50 - 50 - 50 - 50)
FrankShearar
05-03-13 21:27

Kernel-cmm.758 & KernelTests-fbs.249 in Trunk.
 

- Issue History
Date Modified Username Field Change
12-30-08 12:25 M8R New Issue
12-30-08 12:25 M8R Status new => assigned
12-30-08 12:25 M8R Assigned To  => KenCausey
12-30-08 17:42 KenCausey Assigned To KenCausey =>
12-30-08 17:42 KenCausey Status assigned => new
12-30-08 17:42 KenCausey Category Any => Kernel
12-30-08 17:42 KenCausey version 3.11 =>
12-31-08 21:06 wiz Note Added: 0012887
01-01-09 16:03 M8R File Added: Duration-ago.st
01-01-09 16:29 M8R File Added: Duration-fromNow.st
01-01-09 16:30 M8R File Added: DurationTest-testAgo.st
01-01-09 16:30 M8R File Added: DurationTest-testFromNow.st
01-01-09 16:33 M8R Note Added: 0012888
01-01-09 16:34 M8R Note Edited: 0012888
01-01-09 16:35 M8R Note Edited: 0012888
01-02-09 20:27 M8R Issue Monitored: M8R
01-05-13 01:23 nicolas cellier Note Added: 0014284
05-03-13 21:27 FrankShearar Status new => resolved
05-03-13 21:27 FrankShearar Resolution open => fixed
05-03-13 21:27 FrankShearar Assigned To  => FrankShearar
05-03-13 21:27 FrankShearar Note Added: 0014357


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
73 total queries executed.
41 unique queries executed.
Powered by Mantis Bugtracker