# Dates in Base?

**URL:** <https://discourse.julialang.org/t/dates-in-base/3894>\
**Category:** New to Julia\
**Created:** [May 24, 2017, 12:37am UTC](https://discourse.julialang.org/t/dates-in-base/3894 "2017-05-24T00:37:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dennis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dennis/32/1090_2.png) [@dennis](https://discourse.julialang.org/u/dennis)\
**Post date:** [May 24, 2017, 12:37am UTC](https://discourse.julialang.org/t/dates-in-base/3894/1 "2017-05-24T00:37:23Z")

</div>

It’s confusing that `Dates` is in `Base` and it’s a package that can be added. How can I understand this better (where is it documented)? What other modules work this way?

I can do `using Base.Dates` or I can `Pkg.add("Dates")` then do `using Dates` (without “Base”).

---

<div class="post-metadata">

**Author:** ![traktofon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/traktofon/32/591_2.png) [@traktofon](https://discourse.julialang.org/u/traktofon)\
**Post date:** [May 24, 2017, 1:27am UTC](https://discourse.julialang.org/t/dates-in-base/3894/2 "2017-05-24T01:27:39Z")

</div>

> [@dennis](#):
>
> What other modules work this way?

The `Iterators` module is also available both in Base and as a package.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [May 24, 2017, 1:32am UTC](https://discourse.julialang.org/t/dates-in-base/3894/3 "2017-05-24T01:32:52Z")

</div>

> [@dennis](#):
>
> It’s confusing that Dates is in Base and it’s a package that can be added. How can I understand this better (where is it documented)? What other modules work this way?

As explained in [GitHub - quinnj/Dates.jl: [DEPRECATED] Date/DateTime Implementation for the Julia Language; Successor to Datetime.jl](https://github.com/quinnj/Dates.jl), this is only for people who want to use Dates in Julia 0.3. In later versions of Julia you can use the built-in Dates module.

---

<div class="post-metadata">

**Author:** ![dennis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dennis/32/1090_2.png) [@dennis](https://discourse.julialang.org/u/dennis)\
**Post date:** [May 25, 2017, 8:34pm UTC](https://discourse.julialang.org/t/dates-in-base/3894/4 "2017-05-25T20:34:35Z")

</div>

Based on the contents of `~/.julia/v0.5/METADATA/Iterators/url` that package is found at

[https://github.com/JuliaCollections/Iterators.jl](https://github.com/JuliaCollections/Iterators.jl)

But, unlike Dates, its README.md does not state that it’s provided for compatibility with an earlier version of Julia (nor is any other reasoning given).

Also, in my installation of Julia v0.5 there’s no Base.Iterators - only Base.IteratorEltype, Base.IteratorSize and Base.IteratorsMD. And none of them have the functions provided by [https://github.com/JuliaCollections/Iterators.jl](https://github.com/JuliaCollections/Iterators.jl)

---

<div class="post-metadata">

**Author:** ![traktofon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/traktofon/32/591_2.png) [@traktofon](https://discourse.julialang.org/u/traktofon)\
**Post date:** [May 26, 2017, 1:46am UTC](https://discourse.julialang.org/t/dates-in-base/3894/5 "2017-05-26T01:46:53Z")

</div>

Right, the `Base.Iterators` package is only in v0.6. In v0.5 there were a few iterator functions (e.g. `product`) directly in `Base`, which were moved into the `Base.Iterators` package for v0.6. I actually don’t (but would be interested to) know what the long-term plan for this package is in relation to the external `Iterators` package.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [May 26, 2017, 1:49am UTC](https://discourse.julialang.org/t/dates-in-base/3894/6 "2017-05-26T01:49:04Z")

</div>

> [@traktofon](#):
>
> Right, the Base.Iterators package is only in v0.6. In v0.5 there were a few iterator functions (e.g. product) directly in Base, which were moved into the Base.Iterators package for v0.6. I actually don’t (but would be interested to) know what the long-term plan for this package is in relation to the external Iterators package.

Side note: some things are missing from Base.Iterators like `chain`. Is that on purpose?

---

<div class="post-metadata">

**Author:** ![iamed2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iamed2/32/215082_2.png) [@iamed2](https://discourse.julialang.org/u/iamed2)\
**Post date:** [May 28, 2017, 2:36pm UTC](https://discourse.julialang.org/t/dates-in-base/3894/7 "2017-05-28T14:36:36Z")

</div>

Despite providing similar functionality for some functions, the Iterators module in Base and the Iterators package are barely related. Base.Iterators contains only the iterators needed to implement Base functionality.
