# ANN: CompoundPeriods.jl

**URL:** https://discourse.julialang.org/t/ann-compoundperiods-jl/10045
**Category:** Community
**Created:** [March 29, 2018, 5:03am UTC](https://discourse.julialang.org/t/ann-compoundperiods-jl/10045 "2018-03-29T05:03:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)
#### Post date: [March 29, 2018, 5:03am UTC](https://discourse.julialang.org/t/ann-compoundperiods-jl/10045/1 "2018-03-29T05:03:53Z")

</div>

This is something I needed; maybe it will be of use to others. `Dates` uses the type `CompoundPeriod` to handle additive combinations of distinct time `Period`s (like `Day(5) + Minute(25)`).

I have made the type iterable, indexible, more robust and added plural period names as a way to get the total number of, say, whole seconds (including Minutes etc.) that a time value holds.

The [README](https://github.com/JeffreySarnoff/CompoundPeriods.jl/blob/master/README.md) shows how it may be useful.
