Re: [sage-support] subtraction with dates?

2010-08-24 Thread Dr. David Kirkby

On 08/25/10 12:58 AM, Mike Hansen wrote:

On Tue, Aug 24, 2010 at 3:44 PM, Dr. David Kirkby
  wrote:

I was thinking of suggesting they use Sage to find out the number of days
between two dates, and so would realise that there is more than a month
between 5th Jan and the 16th Feb!


sage: from datetime import date
sage: date(day=16, month=2, year=2010) - date(day=5, month=1, year=2010)
datetime.timedelta(42)

--Mike


Thank you Mike. I might just provide worksheet for them to look at.

The silly thing is, they have known about this defect for 9 months, but it was 
given a low priority. 9 months later it damages our car, and the council denies 
they were aware the road was dangerous.


I suspect they will just pay up when we write - the total amount is only about 
$200 is US terms, so hardly worth their while arguing.


Dave

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] subtraction with dates?

2010-08-24 Thread Mike Hansen
On Tue, Aug 24, 2010 at 3:44 PM, Dr. David Kirkby
 wrote:
> I was thinking of suggesting they use Sage to find out the number of days
> between two dates, and so would realise that there is more than a month
> between 5th Jan and the 16th Feb!

sage: from datetime import date
sage: date(day=16, month=2, year=2010) - date(day=5, month=1, year=2010)
datetime.timedelta(42)

--Mike

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org