Bugzilla – Attachment 153418 Details for
Bug 33804
Implement as_due_date for $date (js-date-format)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33804: Add as_due_date option to $date
Bug-33804-Add-asduedate-option-to-date.patch (text/plain), 1.77 KB, created by
Nick Clemens (kidclamp)
on 2023-07-13 16:32:20 UTC
(
hide
)
Description:
Bug 33804: Add as_due_date option to $date
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-07-13 16:32:20 UTC
Size:
1.77 KB
patch
obsolete
>From 9387925034ec73f2a6f3f61a44efa0cc6c29a412 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 23 May 2023 12:16:41 +0200 >Subject: [PATCH] Bug 33804: Add as_due_date option to $date > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc >index 7a54fa773a..640fa5c90c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc >@@ -38,6 +38,7 @@ > * or JS Date, the function will return a date string formatted as per the koha instance config. > * Optionally accepts a dateformat parameter to allow override of the configured output format > * as well as a 'withtime' boolean denoting whether to include time or not in the output string. >+ * 'as_due_date' can be passed to format a date time as a due date: The time part will not be displayed if 23:59. > */ > window.$date = function(value, options) { > if(!value) return ''; >@@ -54,6 +55,10 @@ > > var timeformat = (options&&options.timeformat)||def_time_format; > var date_pattern = get_date_pattern(dateformat); >+ let as_due_date = (options&&options.as_due_date); >+ if (as_due_date) { >+ withtime = !( m.hour() == 23 && m.minute() == 59 ); >+ } > var time_pattern = !withtime?'':' '+get_time_pattern(timeformat); > > return m.format(date_pattern+time_pattern); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33804
:
151559
|
151560
|
151561
|
151666
|
151667
|
151668
| 153418 |
153419
|
153420