Deprecate date options with a time of day setting.

Removing the only use, an example in hello-world.scm. GnuCash doesn't
use this value in any of its own report options and the feature will
be removed in GnuCash 5.

Related to bug 798297 Pref "Use 24-hour clock" obsolete?.
This commit is contained in:
John Ralls 2021-09-10 12:21:46 -07:00
parent ff26b71a91
commit cd0d50aac1
2 changed files with 6 additions and 19 deletions

View File

@ -94,15 +94,6 @@
(lambda () (cons 'absolute (current-time)))
#f 'absolute #f ))
;; This is another date option, but the user can also select
;; the time.
(add-option
(gnc:make-date-option
(N_ "Hello, World!") (N_ "Time and Date Option")
"e" (N_ "This is a date option with time.")
(lambda () (cons 'absolute (current-time)))
#t 'absolute #f ))
(add-option
(gnc:make-date-option
(N_ "Hello, World!") (N_ "Combo Date Option")
@ -234,8 +225,6 @@ option like this.")
(string-val (op-value "Hello, World!" "String Option"))
(date-val (gnc:date-option-absolute-time
(op-value "Hello, World!" "Just a Date Option")))
(date2-val (gnc:date-option-absolute-time
(op-value "Hello, World!" "Time and Date Option")))
(rel-date-val (gnc:date-option-absolute-time
(op-value "Hello, World!" "Relative Date Option")))
(combo-date-val (gnc:date-option-absolute-time
@ -258,7 +247,6 @@ option like this.")
;; qof-print-date
(let ((time-string (gnc-print-time64 (current-time) "%X"))
(date-string (gnc-print-time64 date-val "%x"))
(date-string2 (gnc-print-time64 date2-val "%x %X"))
(rel-date-string (gnc-print-time64 rel-date-val "%x"))
(combo-date-string (gnc-print-time64 combo-date-val "%x")))
@ -369,11 +357,6 @@ new, totally cool report, consult the mailing list ~a.")
(G_ "The date option is ~a.")
(gnc:html-markup-b date-string)))
(gnc:html-markup-p
(gnc:html-markup/format
(G_ "The date and time option is ~a.")
(gnc:html-markup-b date-string2)))
(gnc:html-markup-p
(gnc:html-markup/format
(G_ "The relative date option is ~a.")

View File

@ -719,10 +719,14 @@ the option '~a'."))
(begin
(rpterror-earlier "date" item (car full-list))
0)))
(let* ((value (default-getter))
(if show-time
(issue-deprecation-warning
(format #f "Date options with time of day values are deprecated and will be removed in GnuCash 5.")))
(let* ((value (default-getter))
(value->string (lambda ()
(string-append "'" (gnc:value->string value)))))
(gnc:make-option
(gnc:make-option
section name sort-tag 'date documentation-string
(lambda () value)
(lambda (date)