Rounding DateTime

The docstring for round contains some clues that may be useful

  round(dt::TimeType, p::Period, [r::RoundingMode]) -> TimeType

  Return the Date or DateTime nearest to dt at resolution p. By default (RoundNearestTiesUp), ties (e.g., rounding
  9:30 to the nearest hour) will be rounded up.

  For convenience, p may be a type instead of a value: round(dt, Dates.Hour) is a shortcut for round(dt,
  Dates.Hour(1)).

  julia> round(Date(1985, 8, 16), Dates.Month)
  1985-08-01
  
  julia> round(DateTime(2013, 2, 13, 0, 31, 20), Dates.Minute(15))
  2013-02-13T00:30:00
  
  julia> round(DateTime(2016, 8, 6, 12, 0, 0), Dates.Day)
  2016-08-07T00:00:00

  Valid rounding modes for round(::TimeType, ::Period, ::RoundingMode) are RoundNearestTiesUp (default), RoundDown
  (floor), and RoundUp (ceil).

  ────────────────────────────────────────────────────────────────
  round(x::Period, precision::T, [r::RoundingMode]) where T <: Union{TimePeriod, Week, Day} -> T

  Round x to the nearest multiple of precision. If x and precision are different subtypes of Period, the return value
  will have the same type as precision. By default (RoundNearestTiesUp), ties (e.g., rounding 90 minutes to the
  nearest hour) will be rounded up.

  For convenience, precision may be a type instead of a value: round(x, Dates.Hour) is a shortcut for round(x,
  Dates.Hour(1)).

  julia> round(Dates.Day(16), Dates.Week)
  2 weeks
  
  julia> round(Dates.Minute(44), Dates.Minute(15))
  45 minutes
  
  julia> round(Dates.Hour(36), Dates.Day)
  2 days
8 Likes