delorean icon indicating copy to clipboard operation
delorean copied to clipboard

issues brought up by @wardi

Open myusuf3 opened this issue 12 years ago • 0 comments

[11:06:22] <wardi>   this is the case where your dt is the 31st of the month and you move it to a month without 31 days
[11:06:48] <wardi>   you might want to choose the last day of the month, or maybe the first day of the next month
[11:07:14] <wardi>   or maybe you want it to raise an exception so you can do something else
[11:08:49] <wardi>   as an aside there is also the concept of 'last working day of the month' or 'second tuesday of the month'
[11:54:51]   Pwnna ([email protected]) joined the channel.
[12:08:24] <wardi>   wrt this policy, I think you should make the user choose.  Failing that *at least* you need to document which behaviour delorean has
[12:13:36] <wardi>   personally, I would prefer to use a library that forced me to think carefully about the behaviour I want, instead of quietly making choices for me
[12:14:37] <wardi>   you could have a policy object that you pass to Delorean(), with some sensible default policy.  That would be like the decimal stdlib module
[12:16:00] <wardi>   then you keep an easy api, and clear documentation of which choices are made and a sane way to change the behaviour if you need to
[12:16:49] <wardi>   it's something you could add in a later version if you just document the choices Delorean makes currently

myusuf3 avatar Jan 23 '13 17:01 myusuf3