quinnj / Datetime.jl

A Date and DateTime implementation for Julia; Now deprecated in favor of https://github.com/quinnj/Dates.jl
Other
20 stars 15 forks source link

Have a function that return the name of the month of given date. #24

Closed johansigfrids closed 10 years ago

johansigfrids commented 10 years ago

Would it be possible to have a function that return the name of the month of a given date as a string? Example:

monthname(date(1985,6,21)) ==> "June"

A possible addition would be to be able to tell the function to return a three letter truncated version of the name.

quinnj commented 10 years ago

Thanks for the suggestion. These have been added in the rewrite I've been working on that's going into Base julia. See JuliaLang/julia#5328 for details. I've added monthname, monthabr, dayname, dayabr, to get the month or day name of a Date/Datetime.

quinnj commented 10 years ago

Fixed by ed8123ede2e316a181a781ecd54fd735657b6cd8