> >Supporting this might be cool indeed. OTOH, it doesn't replace the > >current behavior. How do you get (day=30)? > > day=30 is simply '30th day of the month'. > > day=-2 is '2nd last day of the month'. > > The negative simply means 'count from the end', as it does with Python > indexing. This would indeed be useful, and far more obvious than > 'day=31' and relying on the 'use maximum day in month' feature. Thanks for explaining that. OTOH, that's exactly what I meant in the sentence above. Negative indexing is nice, but doesn't replace the current behavior. Please, have a look at the other messages to understand why. > The other question I had was why is there no absolute 'week' > parameter? to get 'week 43', it is necessary to say 'month=1, day=1, > weeks=43'. Because there's no simple definition of what is "week 43". The ISO notation requires other parameters, like first week day, which is not covered in relativedelta. If you want to deal with week numbering, please have a look at rrule. -- Gustavo Niemeyer http://niemeyer.net
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4