# DateTime: Time division

**URL:** <https://discourse.julialang.org/t/datetime-time-division/95285>\
**Category:** General Usage\
**Tags:** dates, algebra\
**Created:** [February 27, 2023, 7:40pm UTC](https://discourse.julialang.org/t/datetime-time-division/95285 "2023-02-27T19:40:48Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Jollywatt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jollywatt/32/202198_2.png) [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Post date:** [February 28, 2023, 9:06am UTC](https://discourse.julialang.org/t/datetime-time-division/95285/8 "2023-02-28T09:06:30Z")

</div>

> [@ryofurue](#):
>
> The original motivation of my post is to ask whether there is already a standard method to handle physical duration of time.

In that case, do consider `Unitful.jl`:

> [@Operations with time duration](https://discourse.julialang.org/t/operations-with-time-duration/64983/10):
>
> ```julia
> julia> using Unitful
> 
> julia> t = 1u"hr" + 5u"minute" + 2u"s"
> 3902 s
> 
> julia> t/5
> 780.4 s
> 
> ```

Incidentally, your desired code does work if you change the compound period `del = Hour(1) + Minute(30)` to a simple period `del = Minute(90)`.

```julia
t1 = DateTime("2023-01-01")
t2 = DateTime("2023-01-02")
del = Minute(90)
time_axis = (t1 + del/2):del:(t2 - del/2)

```

I wonder why using a compound period as a range step isn’t implemented? Perhaps we can get it added!

---

_[View the full topic](https://discourse.julialang.org/t/datetime-time-division/95285)._
