FuzzyDate subclasses' "offset" attribute yields different data types

Bug #942953 reported by Wolter Hellmund on 2012-02-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Getting Things GNOME!
Medium
Izidor Matušov

Bug Description

For example, if you gave a FuzzyDate Xdate set to "later", Xdate.offset will give a number - presumably 15. But if you set Xdate to "soon", it will give a datetime.date object. They should both yield the same kind of object, preferably an integer like in the first case mentioned.

Izidor Matušov (izidor) wrote :

There were big changes to Date class recently and "offset" doesn't exists anymore. You can use days_left().

However, I've fixed the semantic of days_left() to satisfy this use case in rev 1098.

Changed in gtg:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Izidor Matušov (izidor)
milestone: none → 0.3
Wolter Hellmund (wolterh) wrote :

So days_left function will return integers even with FuzzyDate instances? I might have to change my code then haha

Wolter Hellmund (wolterh) wrote :

Oh nevermind, I just read that you fixed that and pushed :)

Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers