diff --git a/ChangeLog b/ChangeLog index d92b576d94..ad417745bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2001-06-17 Dave Peticolas + * src/scm/date-utilities.scm: use gnc:print-date instead of + strftime + + * src/scm/report/hello-world.scm: fix docs + + * src/scm/report/transaction-report.scm: fix date printing + + * src/scm/report/register.scm: remove cruft + * src/register/gnome/gnucash-style.c (gnucash_font_load): new func If gdk_fontset_load doesn't work, try gdk_font_load. (gnucash_style_set_register_font_name): use gnucash_font_load diff --git a/src/scm/date-utilities.scm b/src/scm/date-utilities.scm index ecd02fbac9..a52bf512bb 100644 --- a/src/scm/date-utilities.scm +++ b/src/scm/date-utilities.scm @@ -302,9 +302,7 @@ ;; and be implemented PROPERLY rather than hackily ;;; Added from transaction-report.scm -(define (gnc:timepair-to-datestring tp) - (let ((bdtime (gnc:timepair->date tp))) - (strftime "%x" bdtime))) +(define gnc:timepair-to-datestring gnc:print-date) ;; given a timepair contains any time on a certain day (local time) ;; converts it to be midday that day. diff --git a/src/scm/report/hello-world.scm b/src/scm/report/hello-world.scm index 294b987b81..9e859cf317 100644 --- a/src/scm/report/hello-world.scm +++ b/src/scm/report/hello-world.scm @@ -243,14 +243,17 @@ option like this.") ;; Crash if asked to. (if crash-val (string-length #f)) ;; string-length needs a string - + + ;; these are samples of different date options. for a simple + ;; date with day, month, and year but no time you should use + ;; gnc:print-date or gnc:timepair-to-datestring (let ((time-string (strftime "%X" (localtime (current-time)))) (date-string (strftime "%x" (localtime (car date-val)))) (date-string2 (strftime "%x %X" (localtime (car date2-val)))) (rel-date-string (strftime "%x" (localtime (car rel-date-val)))) (combo-date-string (strftime "%x" (localtime (car combo-date-val))))) - + ;; Here's where we fill the report document with content. We ;; do this by adding 'html objects' such as text, tables, and ;; graphs to the html document we already created. diff --git a/src/scm/report/register.scm b/src/scm/report/register.scm index a0518ea473..c18858665a 100644 --- a/src/scm/report/register.scm +++ b/src/scm/report/register.scm @@ -328,12 +328,6 @@ gnc:*report-options*) - (define (display-date-interval begin end) - (let ((begin-string (strftime "%x" (localtime (car begin)))) - (end-string (strftime "%x" (localtime (car end))))) - (sprintf #f (_ "From %s To %s") begin-string end-string))) - - (define (make-split-table splits options debit-string credit-string amount-string) (define (opt-val section name) diff --git a/src/scm/report/transaction-report.scm b/src/scm/report/transaction-report.scm index fc95d0d182..f6fbaba56e 100644 --- a/src/scm/report/transaction-report.scm +++ b/src/scm/report/transaction-report.scm @@ -637,8 +637,8 @@ and Income accounts"))))) (define (display-date-interval begin end) - (let ((begin-string (strftime "%x" (localtime (car begin)))) - (end-string (strftime "%x" (localtime (car end))))) + (let ((begin-string (gnc:print-date begin)) + (end-string (gnc:print-date end))) (sprintf #f (_ "From %s To %s") begin-string end-string))) (define (get-primary-subtotal-style options)