Thanks for all the suggestions everyone!

I'm feeling good about the core IO upgrade and the flexibility it provides.
I really think that this parsing/formatting functionality, coupled with how
easy it already is to format things in Julia (@sprintf, interpolation,
etc.), a user should be able to handle just about anything they need
without too much hassle.

For those interested, feel free to check out some of the tests:
https://github.com/karbarcca/Dates.jl/blob/master/test/test_io.jl#L178

It even handles Tony Fangs case of Globex super-terse formatting!

f = "duy"
const globex = ["f"=>Jan,"g"=>Feb,"h"=>Mar,"j"=>Apr,"k"=>May,"m"=>Jun,
                "n"=>Jul,"q"=>Aug,"u"=>Sep,"v"=>Oct,"x"=>Nov,"z"=>Dec]
Dates.MONTHTOVALUEABBR["globex"] = globex
Dates.VALUETOMONTHABBR["globex"] = [v=>uppercase(k) for (k,v) in globex]
@test Dates.Date("1F4",f;locale="globex") + Dates.Year(2010) ==
Dates.Date(2014,1,1)
@test Dates.format(Dates.Date(2014,1,1),f;locale="globex") == "1F4"



On Wed, May 28, 2014 at 12:46 PM, Matt Bauman <[email protected]> wrote:

> I know there are a gazillion different ways to specify the timezone, but
> one I see commonly that isn't covered to my knowledge is `X` from ISO 8601.
>  E.g., how you print Dates in zulu time: 2014-05-28T16:46:04Z.
>
> I'm very much looking forward to the new Dates.jl.  Thanks Jacob!
>
> On Wednesday, May 28, 2014 10:38:11 AM UTC-4, Jacob Quinn wrote:
>
>> I'm doing a round of improvements for Date and DateTime
>> parsing/formatting and I'd love to make the test coverage much more robust.
>> I've built the tests around many common cases already, but I'd love to see
>> any more esoteric or possibly tricky cases to make sure the code holds. A
>> great example was Jiahao's example using Chinese character separators:
>>
>> date("2009年12月01日")
>>
>>
>> Anyway, I figured there are quite a few developers out there who run into
>> date/datetime strings every so often, so if you wouldn't mind sharing on
>> this thread, I'd appreciate the additional "real world" test cases.
>>
>> -Jacob
>>
>> Current set of tests: https://github.com/karbarcca/Dates.jl/blob/
>> master/test/test_io.jl
>>
>

Reply via email to