Calendar.day_rollover_relative_to_midnight_utc

You're seeing just the callback day_rollover_relative_to_midnight_utc, go back to Calendar module for more information.
Link to this callback

day_rollover_relative_to_midnight_utc()

View Source

Specs

day_rollover_relative_to_midnight_utc() :: day_fraction()

Define the rollover moment for the given calendar.

This is the moment, in your calendar, when the current day ends and the next day starts.

The result of this function is used to check if two calendars rollover at the same time of day. If they do not, we can only convert datetimes and times between them. If they do, this means that we can also convert dates as well as naive datetimes between them.

This day fraction should be in its most simplified form possible, to make comparisons fast.

Examples

  • If, in your Calendar, a new day starts at midnight, return {0, 1}.
  • If, in your Calendar, a new day starts at sunrise, return {1, 4}.
  • If, in your Calendar, a new day starts at noon, return {1, 2}.
  • If, in your Calendar, a new day starts at sunset, return {3, 4}.