https://github.com/crowdcode-de/calendarium-core
Calendarium is a java utility to create schedules of recurring and single events
https://github.com/crowdcode-de/calendarium-core
Last synced: 11 months ago
JSON representation
Calendarium is a java utility to create schedules of recurring and single events
- Host: GitHub
- URL: https://github.com/crowdcode-de/calendarium-core
- Owner: crowdcode-de
- Created: 2021-08-01T14:59:37.000Z (almost 5 years ago)
- Default Branch: develop
- Last Pushed: 2021-08-23T11:33:21.000Z (almost 5 years ago)
- Last Synced: 2024-03-26T12:20:13.738Z (about 2 years ago)
- Language: Java
- Size: 57.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Calendarium
(C) 2021 Crowdcode GmbH+Co.KG
## Abstract
This is Calendarium, a free easy-to-use, multi-purpose utility for handling recurring entries inside
a temporal context.
## License
This utility is shipped under Apache License 2.0
## Usage
There are multiple ways to cope with the Event classes; instantiate the interface (e.g. when you make use of persistent
beans) or make use of the default implementation (located under impl), which come as value objects (final properties).
The decision logic to determine a due event has been put into strategy objects.
The CalendarEvent will determine the matching event handling strategy and check for due using this object.
### For the unpatient
#### instantiate the events and give it to the Calendarium
```
final LocalDateTime NOW = LocalDateTime.now();
final LocalDateTime firstDayOfYear = LocalDateTime.of(NOW.getYear(), 1, 1, 0, 0);
final LocalDateTime nextYear = NOW.plus(1, ChronoUnit.YEARS);
final CalendarEvent twoMonthEvent = new TwoMonthlyEventImpl(UUID.randomUUID(), CalendarEvent.Precision.DATE, "Two Event", "Test Event Weekly", NOW, firstDayOfYear, nextYear);
Calendarium probe1 = new Calendarium(twoMonthEvent);
```
#### get you stuff done by calendarium
```
EventMap result = probe1.createCalendar(LocalDate.now(), LocalDate.now().plus(1, ChronoUnit.YEARS), true);
List todaysEvents = result.get(NOW.toLocalDate());
```
For more details check CalendariumTest class