Skip to content

brad-neighbors/datebuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datebuilder

joda-time based Date-building convenience utility with a fluent-api style API.

All dates will be in UTC unless specified with inTimeZone()

import static com.bradneighbors.builders.DateBuilder.*;
...
Date oneYearAgoAtMidnight = now().inYear(2009).atMidnightExactly().build();
Date yesterday = yesterday().build();
Date tomorrow = tomorrow().build();
Date birthday = MM_dd_yyyy("08_29_1974").build();
Date birthday = now().inYear(1974).inMonth(8).onDay(29).build();

To use from maven central:

<dependency>
  <groupId>com.bradneighbors.builders</groupId>
  <artifactId>datebuilder</artifactId>
  <version>1.0.0-RELEASE</version>
</dependency>

About

joda-time based Date-building convenience classes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages