# =Dates():Dates() includes extra ":day " in output

**URL:** <https://discourse.julialang.org/t/dates-dates-includes-extra-day-in-output/606>\
**Category:** New to Julia\
**Created:** [November 28, 2016, 10:28am UTC](https://discourse.julialang.org/t/dates-dates-includes-extra-day-in-output/606 "2016-11-28T10:28:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rupert\_Kenna](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rupert_kenna/32/11550_2.png) [@Rupert\_Kenna](https://discourse.julialang.org/u/Rupert_Kenna)\
**Post date:** [November 28, 2016, 10:28am UTC](https://discourse.julialang.org/t/dates-dates-includes-extra-day-in-output/606/1 "2016-11-28T10:28:37Z")

</div>

Hi  
I am new to Julia and tried the sample Jupyter notebooks on:

> **[A gallery of interesting IPython Notebooks](https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks#julia)**
>
> Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc. - ipython/ipython

I could not get them to work as the code failed. As this is likely where new users go, its not a welcoming experience and has made me think of just using R!  
I would like to use EconDatasets.jl which give a rave review for Julia:

> **[Downloading SP500 stock price data with Julia](https://grollchristian.wordpress.com/2014/09/05/sp500-data-download-julia/)**
>
> \[Update\] In order to provide a more convenient and stable way of getting data, I meanwhile started the Julia package EconDatasets.jl. It basically bundles many download routines for different datas…

The first code given here is wrong:  
"Pkg.add(“EconDatasetsing EconDatasets” (sic)  
The notebook is not given but the code is and I got the odd result that what seems to be a date range has ":day " stuck in the middle see below which fails in Juila. See several blocks down at:

dates = Date(1960,1,1):Date(2014,7,20)

[OUT] 1960-01-01:1 day:2014-07-20

Here are some of the other errors:  
WARNING: requiring “Dates” in module “Main” did not define a corresponding module.

Please could you run this code and tell me what I need to do. I think that usch bugs are a turn-off and now wish I hadnt bothered.

Rupert

---

<div class="post-metadata">

**Author:** ![swt30](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swt30/32/4667_2.png) [@swt30](https://discourse.julialang.org/u/swt30)\
**Post date:** [November 28, 2016, 11:03am UTC](https://discourse.julialang.org/t/dates-dates-includes-extra-day-in-output/606/2 "2016-11-28T11:03:21Z")

</div>

Hi Rupert,

I’m not sure what the issue is with the `"Pkg.add("EconDatasetsing EconDatasets" (sic)` thing. The article has the code

```julia
Pkg.add("EconDatasets")
using EconDatasets

```

for me, and this works just fine. Is it possible that this was a typo in the article that has since been corrected?

As for the thing about dates, it’s not a bug - it’s just a slightly odd way of printing a range. In Julia the notation `0:2:10` means a range from 0 to 10 with a step size of 2. The thing you saw printed, `1960-01-01:1 day:2014-07-20`, means a range of dates from 1 Jan 1960 to 20 July 2014 with a step size of 1 day. It’s not entirely obvious because of the space in `1 day`. Maybe this would be better printed as `1960-01-01:(1 day):2014-07-20`. I don’t really work with time series much so I haven’t really followed the development of the Dates code.

Let us know if you run into other issues. Unfortunately one of the frustrating things with taking up Julia at the moment is that the language is moving fast and so a lot of material out there, like those jupyter notebooks, is out of date. If you’d like some more resources, check [Get started with Julia](http://julialang.org/learning/).

Best,  
Scott

---

<div class="post-metadata">

**Author:** ![simonbyrne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simonbyrne/32/19_2.png) [@simonbyrne](https://discourse.julialang.org/u/simonbyrne)\
**Post date:** [November 28, 2016, 4:58pm UTC](https://discourse.julialang.org/t/dates-dates-includes-extra-day-in-output/606/3 "2016-11-28T16:58:28Z")

</div>

The website doesn’t work for me either, but the problem appears to be CSS related, as it briefly appears correct, then changes as it renders.
