5/27/2020

Duration vs Period in Java 8

Both classes can be used to represent an amount of time or also measure the difference two dates.
How to use both in different situations?

  • date-based value (Period): check whether days of period is over setting.

    LocalDate localDate = java.time.LocalDate.parse(matcher.group(1), DATE_TIME_FORMATTER);
    long days = Period.between(localDate, java.time.LocalDate.now()).getDays();
    return (days >= 5);
  • time-based value (Duration): check an interval of time in seconds or nanoseconds.

    Duration.between(startTime, LocalTime.now()).getSeconds();

Ref

Java Period and Duration

5/25/2020

Redpill

Redpill is a my side project which is used to visualize financial statement analysis is the process of analyzing a company's financial statements for decision-making purpose. For me use it to UNDERSTAND the overall health of an organization as well as to evaluate financial performance and business values.

Here are some technologies that can help build it as below.

  1. JDK 11- Module, JavaFx, HttpClient...
  2. Apache Spark - an unified analytics engine for big data processing, with built-in modules for streaming, SQL, machine learning and graph processing.
  3. Integration of Sprint Boot and JavaFx
  4. Spring-based development.
  5. Based on Hexagonal architecture, Ports and adapters architecture, is an architectural pattern used in software design. It aims at creating loosely coupled application components that can be easily connected to different software environments.

Now it's still a drat version will be updated by new ideas.