Re: Terminal date in period expressions

2016-06-28 Thread Vikas Rawal

> 
> Imagine the date is followed by 00:00:00. They are instants in time not 
> entire days.
> 

If they are meant to be instants in time, and the only possible time is 
00:00:00, why should it still be exclusive of the terminal instant?

Ledger’s treatment of time has to be consistent between the way time is 
interpreted when transactions are recorded (in the data file) and the way time 
is treated in the queries.

If we are assuming 00.00.00 time of the day if no time is (or can be) 
specified, then we have to do the same with transactions. This would imply that 
all transactions that took place on 2016/03/31 should be assumed to have taken 
place at 2016/03/31 00:00:00.  That by itself is not a sufficient reason for 
excluding that instant from this query.

What we have now is that if I want transactions from April 1, 2015 to March 31, 
2016, I have to say, show me transactions from April 1, 2015 to April 1, 2016. 
Forget ledger and programming for a second. Does this not sound odd from the 
perspective of an accountant/lay person? That is not how most people would 
think of “from” and “to”.

Vikas







-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Matching a string in medadata tags

2016-06-28 Thread Vikas Rawal
%FlowDetail does not work for me. Nor am I able to match a part of the string.

Please See below for various versions I tried.

Vikas

---


reg -l "tag('FlowDetail') == 'ClaimsOnAdvances/2015/expense20052015.pdf’"



1. reg -l "%FlowDetail == 'ClaimsOnAdvances/2015/expense20052015.pdf’"

2. reg -l %FlowDetail == 'ClaimsOnAdvances/2015/expense20052015.pdf'

3. reg -l %FlowDetail = 'expense20052015'
Error (for all three):
While parsing value expression:
  %FlowDetail == 'ClaimsOnAdvances/2015/expense20052015.pdf'

Error: Invalid char '%'

4. reg -l "tag('FlowDetail') = ‘expense20052015’"

Error:
While handling posting from "/Users/vikas/dummy.ledger", line 15:
> Expenses:CarRepairRs 25000
Error: Invalid function or lambda parameter: 0x7fe4bd0d80e0VALUE: 
"FlowDetail" (4)


> On 28-Jun-2016, at 10:05 pm, John Wiegley  wrote:
> 
>> Martin Michlmayr  writes:
> 
>> reg -l "tag('FlowDetail') == 'BankStatements/2016/expense200515.pdf'"
> 
> A quicker way would be to:
> 
>  %FlowDetail=expense200515
> 
> --
> John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
> http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2
> 
> --
> 
> ---
> You received this message because you are subscribed to the Google Groups 
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ledger-cli+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Terminal date in period expressions

2016-06-28 Thread John Wiegley
> Craig Earls  writes:

> Imagine the date is followed by 00:00:00. They are instants in time not
> entire days.

Craig is right, the "date" of the end of a range is always exclusive, even
though there are times that it would make more sense for it to be inclusive.
It might be useful to have an option to switch the two readings of such
ranges...

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Matching a string in medadata tags

2016-06-28 Thread John Wiegley
> Martin Michlmayr  writes:

> reg -l "tag('FlowDetail') == 'BankStatements/2016/expense200515.pdf'"

A quicker way would be to:

  %FlowDetail=expense200515

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Terminal date in period expressions

2016-06-28 Thread Alexandre Rademaker

https://github.com/ledger/ledger/pull/458

--
Alexandre Rademaker
http://arademaker.github.io 


> On Jun 28, 2016, at 1:34 PM, Simon Michael  wrote:
> 
> On 6/28/16 4:47 AM, Vikas Rawal wrote:
>> The following period expression excludes transactions on March 31, 2016.
>> 
>> --period 'from 2015/04/01 to 2016/03/31’
>> 
>> Is this a feature or a bug? If it is a feature,  it would be good to express 
>> this clearly in the manual in discussion of period_expressions.
> 
> It's by design; Ledger's end dates are always exclusive.
> 
> This is probably mentioned somewhere in the manual, but a pull request making 
> it clearer would probably be accepted easily.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Terminal date in period expressions

2016-06-28 Thread Simon Michael

On 6/28/16 4:47 AM, Vikas Rawal wrote:

The following period expression excludes transactions on March 31, 2016.

--period 'from 2015/04/01 to 2016/03/31’

Is this a feature or a bug? If it is a feature,  it would be good to express 
this clearly in the manual in discussion of period_expressions.


It's by design; Ledger's end dates are always exclusive.

This is probably mentioned somewhere in the manual, but a pull request 
making it clearer would probably be accepted easily.



--

--- 
You received this message because you are subscribed to the Google Groups "Ledger" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Terminal date in period expressions

2016-06-28 Thread Craig Earls
Imagine the date is followed by 00:00:00. They are instants in time not
entire days.

On Tuesday, June 28, 2016, Vikas Rawal  wrote:

> The following period expression excludes transactions on March 31, 2016.
>
> --period 'from 2015/04/01 to 2016/03/31’
>
> Is this a feature or a bug? If it is a feature,  it would be good to
> express this clearly in the manual in discussion of period_expressions.
>
> Vikas
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ledger-cli+unsubscr...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Terminal date in period expressions

2016-06-28 Thread Vikas Rawal
The following period expression excludes transactions on March 31, 2016.

--period 'from 2015/04/01 to 2016/03/31’

Is this a feature or a bug? If it is a feature,  it would be good to express 
this clearly in the manual in discussion of period_expressions.

Vikas

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail