On Thu, Nov 29, 2018 at 2:17 AM Daniele Nicolodi <[email protected]> wrote:
> On 28/11/2018 23:22, Daniele Nicolodi wrote: > > On 28/11/2018 23:17, Martin Blais wrote: > >> On Thu, Nov 29, 2018 at 1:14 AM Oon-Ee Ng <[email protected] > >> > >> That was my impression as well, but after testing it out I found > >> this was not the case. The returned ordered list of transactions is > >> then sorted by date and line number. > >> > >> > >> Yes. Sorted by date. > > > > Is that documented? > https://docs.google.com/document/d/1wAMVrKIA2qtRGmoVDSUBJGmYZSygUaR0uOMW1GV3YE0/edit#heading=h.gni5f2cin8rd https://bitbucket.org/blais/beancount/src/4c79f94e085880bb1d4b469c931435eb246855bf/beancount/core/data.py#lines-568 > > > Would it be a possibility to accept a datetime object instead that a > > date object for the date field (and do not serialize the time part into > > the written file) be enough to obtain sorting by date and time? > No. We've discussed this at length before. This opens a can of worms, will you support all the things that will break on adding a new constraint? > > > > Actually, datetime objects are already accepted building metadata > > instances and I guess the sorting does not strip the time away, thus > > only the serialization would need to be changed. I guess I can prepare a > > patch for this. > > The patch is easy enough and attached, although it is largely untested. > Let me get this right: you're proposing a patch that affects the parser layer, that has potential to break a bunch other people's stuff, and you're not bothering to write a test that specifically handles that case? This is a perfect example how not to contribute to a released open source project. I have no time for "largely untested" patches. -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhMXVpAY%2Bg%2BzPCCU%3DaZ6wFSdz%2B%3DFMAOxbJEP7fi4JUp8GA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
