-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathRELEASE-NOTES.txt
149 lines (104 loc) · 5.28 KB
/
RELEASE-NOTES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
Joda-Time JSP tags contributed project version 1.1.1
----------------------------------------------------
Joda-Time is a date and time handling library that seeks to replace the JDK
Date and Calendar classes.
This is the 1.1.1 release of the JSP tag library support classes.
These classes were converted from code at Jakarta Taglibs by Jim Newsham.
Please check the NOTICE.txt for the Apache credit.
About
-----
The Joda Time Tag Library is a custom tag library for formatting and parsing
Joda dates in jsp pages. This library works very similarly to the date-related
tags in the jstl fmt library, so please refer to the documentation for that
standard if you still have questions after reading this document or online help.
Unlike the fmt tags which work with java.util.Date and java.util.TimeZone objects,
the Joda tags work with Joda DateTime, ReadableInstant, ReadablePartial,
and DateTimeZone objects.
Note that I, Stephen Colebourne, am releasing this because an update needs to reach
the maven repository. However, the code was not provided originally with unit tests.
Therefore, please test the code in your environment before using in production.
Or fork the GitHub project and provide some tests ;-)
Changes since 1.1
-----------------
- Updated OSGI manifest
Changes since 1.0.2
-------------------
- Moved to Java 5
- Moved source code to GitHub
- Changed to maven build
- Mark all maven dependencies as "provided", so they are controlled by users
Build
-----
Build-time dependencies are Joda 1.0 or later, the Servlet 2.4 API, the
JSP 2.0 API, and JSTL 1.1 API. A source build can be achieved from maven.
The library is built with Java 5 and should work with Joda 2.0 or later.
Setup
-----
You'll need a servlet container which supports Servlet 2.4, JSP 2.0, JSTL 1.1.
Copy the joda-time-1.2.jar and joda-time-tags.jar to the WEB-INF/lib directory of
your web application. Declare the library as follows in your jsp pages:
<%@taglib prefix="joda" uri="http://www.joda.org/joda/time/tags"%>
Tags
----
FORMAT.
Example:
<% pageContext.setAttribute("now", new org.joda.time.DateTime()); %>
<joda:format value="${now}" style="SM"/>
Formats ReadableInstant (including DateTime) and ReadablePartial (including LocalDateTime, LocalDate and LocalTime) objects.
The var and scope attributes can be used to set the value of a variable instead of printing the result.
The time zone may be specified using an attribute, en enclosing <joda:dateTimeZone/> tag,
preceding <joda:timeZone/> tag, or via the "org.joda.time.dateTimeZone" scoped variable.
Attributes:
value (required). Must be a ReadableInstant or ReadablePartial.
var. The scoped variable to set.
scope. The scope of the variable to set.
locale. The locale to use for formatting.
style. The style to use for formatting (see Joda format documentation for recognized style strings)
pattern. The pattern to use for formatting (see Joda format documentation for recognized pattern strings)
dateTimeZone. The time zone to use for formatting.
PARSEDATETIME.
Example:
<joda:parseDateTime var="parsed" pattern="yy/M/d" value="05/11/19"/>
<joda:format value="${parsed}" style="L-"/>
Parses a string into a DateTime object.
The var and scope attributes can be used to set the value of a variable instead of printing the result.
The time zone may be specified using an attribute, en enclosing <joda:dateTimeZone/> tag,
preceding <joda:timeZone/> tag, or via the "org.joda.time.dateTimeZone" scoped variable.
Attributes:
value (required; unless value is nested within tag).
Must be a string which can be parsed into a DateTime according to the parsing options specified.
var. The scoped variable to set.
scope. The scope of the variable to set.
locale. The locale to use for parsing.
style. The style to use for parsing (see Joda format documentation for recognized style strings)
pattern. The pattern to use for parsing (see Joda format documentation for recognized pattern strings)
dateTimeZone. The time zone to use for formatting.
DATETIMEZONE.
Example:
<% pageContext.setAttribute("now", new DateTime()); %>
<% pageContext.setAttribute("bkk", DateTimeZone.forID("Asia/Bangkok")); %>
<joda:dateTimeZone value="${bkk}">
<joda:format value="${datetime}"/>
</joda:dateTimeZone>
Provides a default time zone to all <joda:format/> tags which are nested within it.
The <joda:format/> tag may override this value with an explicit dateTimeZone attribute.
Attributes:
value (required). The default time zone for nested <joda:format/> tags to use.
SETDATETIMEZONE.
Example.
<% pageContext.setAttribute("now", new DateTime()); %>
<% pageContext.setAttribute("bkk", DateTimeZone.forID("Asia/Bangkok")); %>
<joda:dateTimeZone value="${bkk}"/>
<joda:format value="${datetime}"/>
Sets the time zone object in the given scoped variable.
If var is not specified, it will be stored in a scoped variable called "org.joda.time.dateTimeZone".
The <joda:format/> tag will default to using a time zone stored under this name if it does not have
a dateTimeZone attribute and is not nested within a <joda:dateTimeZone/> tag.
Attributes:
value (required). The time zone to set.
var. The scoped variable to set.
scope. The scope of the variable to set.
--------
Home page: http://www.joda.org/joda-time-jsptags/
GitHub: https://github.com/JodaOrg/joda-time-jsptags
The Joda team