mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-21 16:38:06 -06:00
Robert Graham Merkel's README and date-utility patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2777 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c2295a2731
commit
a0213aa92e
@ -1,3 +1,8 @@
|
||||
2000-09-05 Robert Graham Merkel <rgmerk@mira.net>
|
||||
|
||||
* src/scm/date-utilities.scm ((gnc:reldate-initialize)): New function - initialise
|
||||
explicitly at startup rather than in ad-hoc manner
|
||||
|
||||
2000-08-31 Robert Graham Merkel <rgmerk@mira.net>
|
||||
|
||||
* src/scm/report/balance-and-pnl.scm: Bug fixes for new date options.
|
||||
|
17
README
17
README
@ -150,7 +150,8 @@ The following packages are required to be installed to run gnucash:
|
||||
gnome-print: any recent version should work.
|
||||
|
||||
gtkhtml: version 0.4 and later should work. You can obtain the latest
|
||||
version of gtkhtml from Helix Code.
|
||||
version of gtkhtml from Helix Code. Note that this has changed since
|
||||
1.4, which used the older gtkxmhtml library.
|
||||
|
||||
To be able to use certain features of GnuCash, such as reports and
|
||||
network stock price downloads, you must have the following packages
|
||||
@ -279,6 +280,7 @@ the GnuCash specific bits.
|
||||
Prior to building GnuCash, you will have to obtain and install the
|
||||
following packages:
|
||||
|
||||
|
||||
libtool: Available at ftp://ftp.gnu.org/gnu.
|
||||
RPM's and debs are widely available with most distributions.
|
||||
|
||||
@ -300,8 +302,8 @@ you'll need for the systems we know about:
|
||||
Debian/GNU/Linux:
|
||||
current:
|
||||
libgnome-dev
|
||||
libxml-dev
|
||||
libgtkxmhtml-dev
|
||||
libgtkhtml-dev (you can grab this from Helixcode, it may not be
|
||||
in Debian itself ATM)
|
||||
guile1.3
|
||||
libguile6-dev
|
||||
libguile6-slib
|
||||
@ -340,7 +342,7 @@ If you want to make sure that all languages get installed, run
|
||||
$ unset LINGUAS
|
||||
$ ./configure
|
||||
|
||||
The last stable release of GnuCash had a Motif based user interface,
|
||||
The 1.2 stable release of GnuCash had a Motif based user interface,
|
||||
and there was also an experimental, but never finished qt interface.
|
||||
Both of these have been removed from the source tree during the
|
||||
process of migrating to automake, but anyone who is interested in
|
||||
@ -367,6 +369,13 @@ to be installed, the above command would install
|
||||
DESTDIR can be helpful when trying to build install images and
|
||||
packages.
|
||||
|
||||
NOTE: If you have installed different parts of Gnome in different
|
||||
places (for instance, if you've installed gtkhtml in /usr/local) you
|
||||
will need to set the environment variables GNOME_PATH and
|
||||
GNOME_LIBCONFIG_PATH. See the manpage for gnome-config for more
|
||||
details.
|
||||
|
||||
|
||||
###################
|
||||
Supported Platforms
|
||||
-------------------
|
||||
|
@ -22,6 +22,8 @@
|
||||
(gnc:support "date-utilities.scm")
|
||||
(gnc:depend "srfi/srfi-19.scm")
|
||||
|
||||
(define gnc:reldate-list '())
|
||||
|
||||
(define (gnc:timepair->secs tp)
|
||||
(inexact->exact
|
||||
(+ (car tp)
|
||||
@ -544,122 +546,124 @@
|
||||
(set-tm:mday now month-days))
|
||||
(gnc:secs->timepair (car (mktime now))))))
|
||||
|
||||
(define (gnc:reldate-all-reldates)
|
||||
(list 'start-cal-year 'start-prev-year 'end-prev-year 'start-cur-fin-year 'start-prev-fin-year
|
||||
'start-this-month 'start-prev-month 'end-prev-month 'start-current-quarter
|
||||
'start-prev-quarter 'end-prev-quarter 'today 'one-month-ago 'three-months-ago
|
||||
'six-months-ago
|
||||
'one-year-ago))
|
||||
|
||||
(gnc:reldate-string-db 'store 'start-cal-year-string "Current Year Start")
|
||||
|
||||
(gnc:reldate-string-db 'store 'start-cal-year-desc "Start of the current calendar year")
|
||||
(gnc:reldate-string-db 'store 'start-prev-year-string "Previous Year Start")
|
||||
(gnc:reldate-string-db 'store 'start-prev-year-desc "Beginning of the previous calendar year")
|
||||
(gnc:reldate-string-db 'store 'end-prev-year-string "Previous Year End")
|
||||
(gnc:reldate-string-db 'store 'end-prev-year-desc "End of the Previous Year")
|
||||
(gnc:reldate-string-db 'store 'start-cur-fin-year-string "Current Financial Year Start")
|
||||
(gnc:reldate-string-db 'store 'start-cur-fin-year-desc "Start of the current financial year/accounting period")
|
||||
(gnc:reldate-string-db 'store 'start-prev-fin-year-string "Previous Financial Year Start")
|
||||
(gnc:reldate-string-db 'store 'start-prev-financial-year-desc "The start of the previous financial year/accounting period")
|
||||
(gnc:reldate-string-db 'store 'end-prev-fin-year-string "End Previous Financial Year")
|
||||
(gnc:reldate-string-db 'store 'end-prev-fin-year-desc "End of the previous Financial year/Accounting Period")
|
||||
(gnc:reldate-string-db 'store 'start-this-month-string "Start of this month")
|
||||
(gnc:reldate-string-db 'store 'start-this-month-desc "Start of the current month")
|
||||
(gnc:reldate-string-db 'store 'start-prev-month-string "Start of previous month")
|
||||
(gnc:reldate-string-db 'store 'start-prev-month-desc "The beginning of the previous month")
|
||||
(gnc:reldate-string-db 'store 'end-prev-month-string "End of previous month")
|
||||
(gnc:reldate-string-db 'store 'end-prev-month-description "Last day of previous month")
|
||||
(gnc:reldate-string-db 'store 'start-current-quarter-string "Start of current quarter")
|
||||
(gnc:reldate-string-db 'store 'start-current-quarter-desc "The start of the latest quarterly accounting period")
|
||||
(gnc:reldate-string-db 'store 'start-prev-quarter-string "Start of previous quarter")
|
||||
(gnc:reldate-string-db 'store 'start-prev-quarter-desc "The start of the previous quarterly accounting period")
|
||||
(gnc:reldate-string-db 'store 'end-prev-quarter-string "End of previous quarter")
|
||||
(gnc:reldate-string-db 'store 'end-prev-quarter-desc "End of previous quarterly accounting period")
|
||||
(gnc:reldate-string-db 'store 'today-string "Today")
|
||||
(gnc:reldate-string-db 'store 'today-desc "The current date")
|
||||
(gnc:reldate-string-db 'store 'one-month-ago-string "One Month Ago")
|
||||
(gnc:reldate-string-db 'store 'one-month-ago-desc "One Month Ago")
|
||||
(gnc:reldate-string-db 'store 'one-week-ago-string "One Week Ago")
|
||||
(gnc:reldate-string-db 'store 'one-week-ago-desc "One Week Ago")
|
||||
(gnc:reldate-string-db 'store 'three-months-ago-string "Three Months Ago")
|
||||
(gnc:reldate-string-db 'store 'three-months-ago-desc "Three Months Ago")
|
||||
(gnc:reldate-string-db 'store 'six-months-ago-string "Six Months Ago")
|
||||
(gnc:reldate-string-db 'store 'six-months-ago-string "Six Months Ago")
|
||||
(gnc:reldate-string-db 'store 'one-year-ago-string "One Year Ago")
|
||||
(gnc:reldate-string-db 'store 'one-year-ago-desc "One Year Ago")
|
||||
|
||||
(set! gnc:relative-date-values
|
||||
(list
|
||||
(vector 'start-cal-year
|
||||
(gnc:reldate-string-db 'lookup 'start-cal-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-cal-year-desc)
|
||||
gnc:get-start-cal-year)
|
||||
(vector 'start-prev-year
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-year-desc)
|
||||
gnc:get-start-prev-year)
|
||||
(vector 'end-prev-year
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-year-desc)
|
||||
gnc:get-end-prev-year)
|
||||
(vector 'start-cur-fin-year
|
||||
(gnc:reldate-string-db 'lookup 'start-cur-fin-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-cur-fin-year-desc)
|
||||
gnc:get-start-cur-fin-year)
|
||||
(vector 'start-prev-fin-year
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-fin-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-fin-year-desc)
|
||||
gnc:get-start-prev-fin-year)
|
||||
(vector 'end-prev-fin-year
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-fin-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-fin-year-desc)
|
||||
gnc:get-end-prev-fin-year)
|
||||
(vector 'start-this-month
|
||||
(gnc:reldate-string-db 'lookup 'start-this-month-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-this-month-desc)
|
||||
gnc:get-start-this-month)
|
||||
(vector 'start-prev-month
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-month-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-month-desc)
|
||||
gnc:get-start-prev-month)
|
||||
(vector 'end-prev-month
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-month-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-month-desc)
|
||||
gnc:get-end-prev-month)
|
||||
(vector 'start-current-quarter
|
||||
(gnc:reldate-string-db 'lookup 'start-current-quarter-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-current-quarter-desc)
|
||||
gnc:get-start-current-quarter)
|
||||
(vector 'start-prev-quarter
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-quarter-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-quarter-desc)
|
||||
gnc:get-start-prev-quarter)
|
||||
(vector 'end-prev-quarter
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-quarter-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-quarter-desc)
|
||||
gnc:get-end-prev-quarter)
|
||||
(vector 'today
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-quarter-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-quarter-desc)
|
||||
gnc:get-today)
|
||||
(vector 'one-month-ago
|
||||
(gnc:reldate-string-db 'lookup 'one-month-ago-string)
|
||||
(gnc:reldate-string-db 'lookup 'one-month-ago-desc)
|
||||
gnc:get-one-month-ago)
|
||||
(vector 'three-months-ago
|
||||
(gnc:reldate-string-db 'lookup 'three-months-ago-string)
|
||||
(gnc:reldate-string-db 'lookup 'three-months-ago-desc)
|
||||
gnc:get-three-months-ago)
|
||||
(vector 'six-months-ago
|
||||
(gnc:reldate-string-db 'lookup 'six-months-ago-string)
|
||||
(gnc:reldate-string-db 'lookup 'six-months-ago-desc)
|
||||
gnc:get-three-months-ago)
|
||||
(vector 'one-year-ago
|
||||
(gnc:reldate-string-db 'lookup 'one-year-ago-string)
|
||||
(gnc:reldate-string-db 'lookup 'one-year-ago-desc)
|
||||
gnc:get-one-year-ago)))
|
||||
|
||||
(define (gnc:reldate-initialize)
|
||||
(begin
|
||||
(gnc:reldate-string-db 'store 'start-cal-year-string "Current Year Start")
|
||||
|
||||
(gnc:reldate-string-db 'store 'start-cal-year-desc "Start of the current calendar year")
|
||||
(gnc:reldate-string-db 'store 'start-prev-year-string "Previous Year Start")
|
||||
(gnc:reldate-string-db 'store 'start-prev-year-desc "Beginning of the previous calendar year")
|
||||
(gnc:reldate-string-db 'store 'end-prev-year-string "Previous Year End")
|
||||
(gnc:reldate-string-db 'store 'end-prev-year-desc "End of the Previous Year")
|
||||
(gnc:reldate-string-db 'store 'start-cur-fin-year-string "Current Financial Year Start")
|
||||
(gnc:reldate-string-db 'store 'start-cur-fin-year-desc "Start of the current financial year/accounting period")
|
||||
(gnc:reldate-string-db 'store 'start-prev-fin-year-string "Previous Financial Year Start")
|
||||
(gnc:reldate-string-db 'store 'start-prev-financial-year-desc "The start of the previous financial year/accounting period")
|
||||
(gnc:reldate-string-db 'store 'end-prev-fin-year-string "End Previous Financial Year")
|
||||
(gnc:reldate-string-db 'store 'end-prev-fin-year-desc "End of the previous Financial year/Accounting Period")
|
||||
(gnc:reldate-string-db 'store 'start-this-month-string "Start of this month")
|
||||
(gnc:reldate-string-db 'store 'start-this-month-desc "Start of the current month")
|
||||
(gnc:reldate-string-db 'store 'start-prev-month-string "Start of previous month")
|
||||
(gnc:reldate-string-db 'store 'start-prev-month-desc "The beginning of the previous month")
|
||||
(gnc:reldate-string-db 'store 'end-prev-month-string "End of previous month")
|
||||
(gnc:reldate-string-db 'store 'end-prev-month-description "Last day of previous month")
|
||||
(gnc:reldate-string-db 'store 'start-current-quarter-string "Start of current quarter")
|
||||
(gnc:reldate-string-db 'store 'start-current-quarter-desc "The start of the latest quarterly accounting period")
|
||||
(gnc:reldate-string-db 'store 'start-prev-quarter-string "Start of previous quarter")
|
||||
(gnc:reldate-string-db 'store 'start-prev-quarter-desc "The start of the previous quarterly accounting period")
|
||||
(gnc:reldate-string-db 'store 'end-prev-quarter-string "End of previous quarter")
|
||||
(gnc:reldate-string-db 'store 'end-prev-quarter-desc "End of previous quarterly accounting period")
|
||||
(gnc:reldate-string-db 'store 'today-string "Today")
|
||||
(gnc:reldate-string-db 'store 'today-desc "The current date")
|
||||
(gnc:reldate-string-db 'store 'one-month-ago-string "One Month Ago")
|
||||
(gnc:reldate-string-db 'store 'one-month-ago-desc "One Month Ago")
|
||||
(gnc:reldate-string-db 'store 'one-week-ago-string "One Week Ago")
|
||||
(gnc:reldate-string-db 'store 'one-week-ago-desc "One Week Ago")
|
||||
(gnc:reldate-string-db 'store 'three-months-ago-string "Three Months Ago")
|
||||
(gnc:reldate-string-db 'store 'three-months-ago-desc "Three Months Ago")
|
||||
(gnc:reldate-string-db 'store 'six-months-ago-string "Six Months Ago")
|
||||
(gnc:reldate-string-db 'store 'six-months-ago-string "Six Months Ago")
|
||||
(gnc:reldate-string-db 'store 'one-year-ago-string "One Year Ago")
|
||||
(gnc:reldate-string-db 'store 'one-year-ago-desc "One Year Ago")
|
||||
|
||||
(set! gnc:relative-date-values
|
||||
(list
|
||||
(vector 'start-cal-year
|
||||
(gnc:reldate-string-db 'lookup 'start-cal-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-cal-year-desc)
|
||||
gnc:get-start-cal-year)
|
||||
(vector 'start-prev-year
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-year-desc)
|
||||
gnc:get-start-prev-year)
|
||||
(vector 'end-prev-year
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-year-desc)
|
||||
gnc:get-end-prev-year)
|
||||
(vector 'start-cur-fin-year
|
||||
(gnc:reldate-string-db 'lookup 'start-cur-fin-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-cur-fin-year-desc)
|
||||
gnc:get-start-cur-fin-year)
|
||||
(vector 'start-prev-fin-year
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-fin-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-fin-year-desc)
|
||||
gnc:get-start-prev-fin-year)
|
||||
(vector 'end-prev-fin-year
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-fin-year-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-fin-year-desc)
|
||||
gnc:get-end-prev-fin-year)
|
||||
(vector 'start-this-month
|
||||
(gnc:reldate-string-db 'lookup 'start-this-month-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-this-month-desc)
|
||||
gnc:get-start-this-month)
|
||||
(vector 'start-prev-month
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-month-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-month-desc)
|
||||
gnc:get-start-prev-month)
|
||||
(vector 'end-prev-month
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-month-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-month-desc)
|
||||
gnc:get-end-prev-month)
|
||||
(vector 'start-current-quarter
|
||||
(gnc:reldate-string-db 'lookup 'start-current-quarter-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-current-quarter-desc)
|
||||
gnc:get-start-current-quarter)
|
||||
(vector 'start-prev-quarter
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-quarter-string)
|
||||
(gnc:reldate-string-db 'lookup 'start-prev-quarter-desc)
|
||||
gnc:get-start-prev-quarter)
|
||||
(vector 'end-prev-quarter
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-quarter-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-quarter-desc)
|
||||
gnc:get-end-prev-quarter)
|
||||
(vector 'today
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-quarter-string)
|
||||
(gnc:reldate-string-db 'lookup 'end-prev-quarter-desc)
|
||||
gnc:get-today)
|
||||
(vector 'one-month-ago
|
||||
(gnc:reldate-string-db 'lookup 'one-month-ago-string)
|
||||
(gnc:reldate-string-db 'lookup 'one-month-ago-desc)
|
||||
gnc:get-one-month-ago)
|
||||
(vector 'three-months-ago
|
||||
(gnc:reldate-string-db 'lookup 'three-months-ago-string)
|
||||
(gnc:reldate-string-db 'lookup 'three-months-ago-desc)
|
||||
gnc:get-three-months-ago)
|
||||
(vector 'six-months-ago
|
||||
(gnc:reldate-string-db 'lookup 'six-months-ago-string)
|
||||
(gnc:reldate-string-db 'lookup 'six-months-ago-desc)
|
||||
gnc:get-three-months-ago)
|
||||
(vector 'one-year-ago
|
||||
(gnc:reldate-string-db 'lookup 'one-year-ago-string)
|
||||
(gnc:reldate-string-db 'lookup 'one-year-ago-desc)
|
||||
gnc:get-one-year-ago)))
|
||||
|
||||
|
||||
|
||||
(gnc:make-reldate-hash gnc:relative-date-hash gnc:relative-date-values)
|
||||
(gnc:make-reldate-hash gnc:relative-date-hash gnc:relative-date-values)
|
||||
(set! gnc:reldate-list (map (lambda (x) (vector-ref x 0)) gnc:relative-date-values))))
|
||||
|
||||
|
||||
;; Startup
|
||||
(let ((hook (gnc:hook-lookup 'startup-hook)))
|
||||
(gnc:hook-add-dangler hook gnc:reldate-initialize))
|
||||
|
@ -77,10 +77,6 @@
|
||||
(newline port))))
|
||||
|
||||
(define (report-output->string tree)
|
||||
(display "(Report-Tree ")
|
||||
(display tree)
|
||||
(display ")")
|
||||
(newline)
|
||||
(call-with-output-string
|
||||
(lambda (port)
|
||||
(output-tree-to-port tree port))))
|
||||
|
Loading…
Reference in New Issue
Block a user