Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day of week (Monday, Tuesday, ...) and Months might be Enum #19210

Open
femtotrader opened this issue Nov 3, 2016 · 7 comments
Open

Day of week (Monday, Tuesday, ...) and Months might be Enum #19210

femtotrader opened this issue Nov 3, 2016 · 7 comments
Labels
domain:dates Dates, times, and the Dates stdlib module

Comments

@femtotrader
Copy link

femtotrader commented Nov 3, 2016

Following #19208

Day of week (Monday, Tuesday, ...) might be an Enum instead of an Int

See

const Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday = 1,2,3,4,5,6,7

So

const Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday = 1,2,3,4,5,6,7
const Mon,Tue,Wed,Thu,Fri,Sat,Sun = 1,2,3,4,5,6,7

could be replaced by

@enum(DayOfWeek, 
    Monday = 1,
    Tuesday,
    Wednesday,
    Thursday,
    Friday,
    Saturday,
    Sunday
)
Mon, Tue, Wed, Thu, Fri, Sat, Sun = Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
@tkelman tkelman added the domain:dates Dates, times, and the Dates stdlib module label Nov 3, 2016
simonbyrne added a commit that referenced this issue Nov 3, 2016
* Provide optional argument to `firsdayofweek`/`lastdayofweek` (#19208)
* A few misc fixes.
@simonbyrne
Copy link
Contributor

Months could also be an enum, though this might be a bit more of a breaking change.

@femtotrader
Copy link
Author

femtotrader commented Nov 4, 2016

I'm also for Months as Enum (see #19221 )

But this should probably be part of an other PR.

My opinion is also that we should also take care of performance benchmarking.

Is there any website which display such graph
like http:https://pandas.pydata.org/pandas-docs/vbench/vb_index_object.html ?

It will help to see performance regression.

PS: An other example of benchmark https://pv.github.io/numpy-bench/

@quinnj
Copy link
Member

quinnj commented Nov 4, 2016

I'll drop a breadcrumb here of some past benchmarks I did for Dates code. It obviously needs restructuring in order to get into BaseBenchmarks.jl, but might be a useful starting point if someone is up for it.

@quinnj
Copy link
Member

quinnj commented Nov 4, 2016

@femtotrader
Copy link
Author

So there is no website to display historical values after each commit ?

@StefanKarpinski
Copy link
Sponsor Member

So there is no website to display historical values after each commit ?

💯 this is what I've wanted for a rather long time.

@simonbyrne
Copy link
Contributor

See JuliaCI/BaseBenchmarks.jl#39

simonbyrne added a commit that referenced this issue Nov 16, 2016
* Provide optional argument to `firsdayofweek`/`lastdayofweek` (#19208)
* A few misc fixes.
simonbyrne added a commit that referenced this issue Nov 17, 2016
* Provide optional argument to `firsdayofweek`/`lastdayofweek` (#19208)
* A few misc fixes.
simonbyrne added a commit that referenced this issue Nov 18, 2016
* Provide optional argument to `firsdayofweek`/`lastdayofweek` (#19208)
* A few misc fixes.
@KristofferC KristofferC changed the title Day of week (Monday, Tuesday, ...) might be Enum Day of week (Monday, Tuesday, ...) and Months might be Enum May 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:dates Dates, times, and the Dates stdlib module
Projects
None yet
Development

No branches or pull requests

5 participants