jtimeago

Tag lib for "Time ago" date formatting

Лицензия

Лицензия

Группа

Группа

com.aerse
Идентификатор

Идентификатор

jtimeago
Последняя версия

Последняя версия

1.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

jtimeago
Tag lib for "Time ago" date formatting
Ссылка на сайт

Ссылка на сайт

https://github.com/dernasherbrezon/jtimeago
Система контроля версий

Система контроля версий

https://github.com/dernasherbrezon/jtimeago

Скачать jtimeago

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.aerse/jtimeago/ -->
<dependency>
    <groupId>com.aerse</groupId>
    <artifactId>jtimeago</artifactId>
    <version>1.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.aerse/jtimeago/
implementation 'com.aerse:jtimeago:1.3'
// https://jarcasting.com/artifacts/com.aerse/jtimeago/
implementation ("com.aerse:jtimeago:1.3")
'com.aerse:jtimeago:jar:1.3'
<dependency org="com.aerse" name="jtimeago" rev="1.3">
  <artifact name="jtimeago" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.aerse', module='jtimeago', version='1.3')
)
libraryDependencies += "com.aerse" % "jtimeago" % "1.3"
[com.aerse/jtimeago "1.3"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
javax.servlet.jsp : javax.servlet.jsp-api jar 2.3.3
javax.servlet : javax.servlet-api jar 3.1.0

test (5)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.10
org.eclipse.jetty : jetty-http jar 9.4.15.v20190215
org.eclipse.jetty : jetty-webapp jar 9.4.15.v20190215
org.eclipse.jetty : apache-jsp jar 9.4.15.v20190215
jstl : jstl jar 1.2

Модули Проекта

Данный проект не имеет модулей.

jtimeago Build Status Quality Gate Status

Tag lib for various date formatting:

  • "Time ago". Examples: 1 seconds ago, 2 months ago, just now
  • Interval. Examples: 2 months, 5 years, 1 year

Usage

Include dependency:

		<dependency>
			<groupId>com.aerse</groupId>
			<artifactId>jtimeago</artifactId>
			<version>1.3</version>
		</dependency>

Configure taglib:

<%@ taglib prefix="ta" uri="https://github.com/dernasherbrezon/jtimeago" %>

Time ago

Use as normal JSTL formatDate:

<ta:formatDate value="${comment.date}" pattern="dd MMM yyyy HH:mm" />

Supported configuration parameters:

  • value. Required. java.util.Date to format
  • pattern. Required. Pattern for SimpleDateFormat. Used for more than one day ago dates.
  • timeZone. Optional. String or java.util.TimeZone
  • var. Optional. Output into var with defined scope.
  • scope. Optional. scope for var

Interval

Format "years":

<ta:formatYear value="10" />

Supported configuration parameters:

  • value. Required. Number.
  • var. Optional. Output into var with defined scope.
  • scope. Optional. scope for var

Format "months":

<ta:formatMonth value="10" />

Supported configuration parameters:

  • value. Required. Number.
  • var. Optional. Output into var with defined scope.
  • scope. Optional. scope for var

Версии библиотеки

Версия
1.3
1.2
1.1