smart-date-string

Demo project for Spring Boot

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

jp.spring-boot-reference
ArtifactId

ArtifactId

smart-date-string
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

smart-date-string
Demo project for Spring Boot
Project URL

Project URL

https://github.com/kcwebapply/smart-date-string
Source Code Management

Source Code Management

https://github.com/kcwebapply/smart-date-string

Download smart-date-string

How to add to project

<!-- https://jarcasting.com/artifacts/jp.spring-boot-reference/smart-date-string/ -->
<dependency>
    <groupId>jp.spring-boot-reference</groupId>
    <artifactId>smart-date-string</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/jp.spring-boot-reference/smart-date-string/
implementation 'jp.spring-boot-reference:smart-date-string:1.1'
// https://jarcasting.com/artifacts/jp.spring-boot-reference/smart-date-string/
implementation ("jp.spring-boot-reference:smart-date-string:1.1")
'jp.spring-boot-reference:smart-date-string:jar:1.1'
<dependency org="jp.spring-boot-reference" name="smart-date-string" rev="1.1">
  <artifact name="smart-date-string" type="jar" />
</dependency>
@Grapes(
@Grab(group='jp.spring-boot-reference', module='smart-date-string', version='1.1')
)
libraryDependencies += "jp.spring-boot-reference" % "smart-date-string" % "1.1"
[jp.spring-boot-reference/smart-date-string "1.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter jar 2.1.1.RELEASE

test (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar 2.1.1.RELEASE

Project Modules

There are no modules declared in this project.

smart-date-string

apache licensed Java Maven Central

https://search.maven.org/artifact/jp.spring-boot-reference/smart-date-string/1.1/jar https://oss.sonatype.org/content/repositories/releases/jp/spring-boot-reference/smart-date-string/

Usage

you can generate date string easily like below.

date string generate

// generate date string (in this case, returned time is when you execute this method.)
SmartDateString.generate("yyyy/MM/dd");
// 2018/12/09

// generate date string from timezone data
SmartDateString.generate("yyyy/MM/dd hh:mm:ss",TimeZone.getTimeZone("Asia/Tokyo"));
// 2018/12/09 07:42:40

// you can set year, month and date
SmartDateString.generate("yyyy/MM/dd",2019,09);
// 2019/09/09

// generate date string from calender object
SmartDateString.generate("yyyy/MM/dd hh:mm:ss",Calender.getInstance());
// 2018/12/09 07:42:40

date calculation

// you can get previous day
SmartDateString.generatePreviousDay("yyyy/MM/dd hh:mm:ss",100)
// 2018/08/31 07:42:40

// you can get later day
SmartDateString.generateLaterDay("yyyy/MM/dd hh:mm:ss",100)
// 2019/03/19 07:42:40

// generate calcucation result from calender, or date object 
SmartDateString.generatePreviousDay("yyyy/MM/dd hh:mm:ss",100,Calender.getInstance());
// 2018/08/31 07:42:40
SmartDateString.generateLaterDay("yyyy/MM/dd hh:mm:ss",120,new Date());
// 2019/04/08 07:42:40

Dependency

Maven

<dependency>
    <groupId>jp.spring-boot-reference</groupId>
    <artifactId>smart-date-string</artifactId>
    <version>1.0</version>
</dependency>

Gradle

compile 'jp.spring-boot-reference:smart-date-string:1.0'

Versions

Version
1.1
1.0