Bugzilla – Attachment 101715 Details for
Bug 24455
Add ability to apply Koha formatting to dates from Javascript
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24455: (follow-up) Document function
Bug-24455-follow-up-Document-function.patch (text/plain), 1.51 KB, created by
Martin Renvoize (ashimema)
on 2020-03-25 13:42:57 UTC
(
hide
)
Description:
Bug 24455: (follow-up) Document function
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-25 13:42:57 UTC
Size:
1.51 KB
patch
obsolete
>From 6d720a219fab8b9fb3a88a1e40afee360c7004e1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 25 Mar 2020 13:40:04 +0000 >Subject: [PATCH] Bug 24455: (follow-up) Document function > >This patch just adds some minimal documentation to the main exported JS >function. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/includes/js-date-format.inc | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >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 91a770a5a6..26a354929c 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 >@@ -24,6 +24,12 @@ > return time_pattern; > }; > >+ /* >+ * A JS equivilent of the KohaDates TT Plugin. Passed an rfc3339 formatted date string, >+ * 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. >+ */ > window.$date = function(value, options) { > var tz = (options&&options.tz)||def_tz; > var m = moment(value); >@@ -59,4 +65,4 @@ > } > > })(); >-</script> >\ No newline at end of file >+</script> >-- >2.20.1
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 24455
:
97567
|
97568
|
97569
|
97574
|
97575
|
97576
|
97577
|
97578
|
98625
|
99192
|
99195
|
99198
|
99869
|
99870
|
99871
|
99872
|
99873
|
99874
|
99875
|
100119
|
100120
|
100121
|
100122
|
100123
|
100124
|
100125
|
101708
|
101709
|
101710
|
101711
|
101712
|
101713
|
101714
| 101715