NewestUser / imen

Simple web application showcasing the Bulgarian Calendar
1 stars 4 forks source link

Date conversion - first solution #7

Closed rositsabodurova closed 4 years ago

rositsabodurova commented 5 years ago

@NewestUser @IvoStaynov @dahmedov Here is what I have figured out as a first simple solution for the date conversion. I will be expecting your ideas and comments.

rositsabodurova commented 5 years ago

Hi everyone! I have addressed most of the comments provided by @NewestUser Thank you for the suggestions and ideas. The unit test is to be done next.

The conversion methods are implemented using Maps. Let me know if you have more elegant ideas for them (especially the one for day conversion).

I have also added an element to show the Gregorian current date to the index page along with the Bulgarian one.

rositsabodurova commented 4 years ago

Hi everyone! I need your input here. As you can see from my previous commit, BulgarianDate class does not have methods/constructors for conversion of a given Gregorian date to the respective Bulgarian Date. The conversion happens in the .now() method and affects only the current date. I have added a constructor with Date type parameter for Gregorian date, along with an empty one. On the other hand, the tests must be performed with specific dates, not only the current one.

The test I have written does not pass, so I need your ideas on that. @NewestUser @dahmedov @IvoStaynov @b0b3t0

Thanks!

NewestUser commented 4 years ago

LGTM

Your build is failing: Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.12.0:check (validate) on project imen: You have 2 PMD violations.

You can run ./mvnw clean verify to see the results. You need to fix them as this blocks merging this PR