-
Notifications
You must be signed in to change notification settings - Fork 4
DateTime Objects and Formats
- The day format (MM/dd) is based on the year 2000, which includes a leap day.
- With the is-between primitive, there are three cases for determining if a LogoTime object is between two "Day" (MM/dd) dates.
- is-between takes 3 arguments is-between (day-to-check) (start-day) (end-day)
- if the start-day is before the end-day, then the comparison acts as such, start-day < start-day < end-day
- if the start-day is after the end-time, then the comparison acts as such, end-day 2000 < start-day < start-day 2001
- this behavior above is helpful with overlapping years
- if the start-day is equal to the end-time, then the day-to-check needs to be equal to be true or else it will be false
The days of the week are numbered from 1 to 7 (Monday to Sunday) starting off on Monday. This has slightly changed since the use of the Java 8 time library. Date and DateTime objects can determine the day of the week since enough information is provided. The Day LogoTime does support this feature, but will be based on the Year 2000,since the year cannot be specified.
With the upgrade to the latest library, there have been minor tweaks on how units of time are passed. Both Joda and Java 8 have immutable objects, but depending on the operation a copy or reference is returned.
One example is the plus method for LocalDateTime. If 0 is applied, then the same object is returned, whereas Joda would construct a copy. This has been a common pain point in maintaining compatibility with the Joda release (v1.4.0).