Re: Reports with Month-end rather that Month-start

2017-09-05 Thread Mark Hedges
Not sure about what to do in GnuCash, but the logic is simple to code with
a good date/time library to work with.

In Perl, for example, you'd do something like:

my $dt = DateTime->new( year => $year, month => $month, day => 1 )
->add( months => 1 )
->subtract( days => 1 )
;
say $dt->ymd('-');
# or
say $some_datetime_formatter->format_date($dt);

Pretty sure this will get the right answer every time.  Other people
smarter than me have usually worked out how to do neat things like this in
handy libraries, in whatever language.

HTH.
Mark



On Sep 5, 2017 8:03 AM, "David T. via gnucash-user" <
gnucash-user@gnucash.org> wrote:

> Ken,
>
> I don’t know where in the code base you want to look—but I will note that
> “the last day of the month” is more difficult to calculate than “the first
> day of the month.” The first day is always number 1; the last day varies
> month to month. I know some software packages make use of a conceptual
> "zero day of a month” to equate to the day before the first, but I do not
> know whether that convention applies in the GnuCash/Scheme. Not being a
> GnuCash programmer, I’ll let someone else with more experience weigh in.
>
> David
>
> > On Sep 5, 2017, at 7:47 PM, km22  wrote:
> >
> > Hi Gnucash community,
> >
> > I want to start editing -- and eventually creating -- my own reports and
> > figures.  I think one place for me to start learning is by playing with
> > some existing report settings -- such as the report date functionality.
> > Currently when I run a report with a "monthly" period I get the 1st day
> > of each month.  How could I edit the report settings so I get the last
> > day of each month instead?  (I am a Windows 7 user if that makes a
> > difference on where to find/edit files.)
> >
> > Thanks,
> >
> > Ken
> >
> >
> >
> > ___
> > gnucash-user mailing list
> > gnucash-user@gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > -
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
>
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
___
gnucash-user mailing list
gnucash-user@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Re: Reports with Month-end rather that Month-start

2017-09-05 Thread David T. via gnucash-user
Ken,

I don’t know where in the code base you want to look—but I will note that “the 
last day of the month” is more difficult to calculate than “the first day of 
the month.” The first day is always number 1; the last day varies month to 
month. I know some software packages make use of a conceptual "zero day of a 
month” to equate to the day before the first, but I do not know whether that 
convention applies in the GnuCash/Scheme. Not being a GnuCash programmer, I’ll 
let someone else with more experience weigh in.

David

> On Sep 5, 2017, at 7:47 PM, km22  wrote:
> 
> Hi Gnucash community,
> 
> I want to start editing -- and eventually creating -- my own reports and
> figures.  I think one place for me to start learning is by playing with
> some existing report settings -- such as the report date functionality. 
> Currently when I run a report with a "monthly" period I get the 1st day
> of each month.  How could I edit the report settings so I get the last
> day of each month instead?  (I am a Windows 7 user if that makes a
> difference on where to find/edit files.)
> 
> Thanks,
> 
> Ken
> 
> 
> 
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reports with Month-end rather that Month-start

2017-09-05 Thread km22
Hi Gnucash community,

I want to start editing -- and eventually creating -- my own reports and
figures.  I think one place for me to start learning is by playing with
some existing report settings -- such as the report date functionality. 
Currently when I run a report with a "monthly" period I get the 1st day
of each month.  How could I edit the report settings so I get the last
day of each month instead?  (I am a Windows 7 user if that makes a
difference on where to find/edit files.)

Thanks,

Ken



___
gnucash-user mailing list
gnucash-user@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.