elixir-koans icon indicating copy to clipboard operation
elixir-koans copied to clipboard

Koans about Date and Time

Open art4ride opened this issue 9 years ago • 4 comments

For me it was a nice thing to know about ways to work with them, especially about NaiveDateTime sigil, which was not obvious. If you also think that's nice, I can PR the couple of koans about them

art4ride avatar Sep 02 '16 16:09 art4ride

That seems useful to me! Maybe even something about the new calendar types?

iamvery avatar Sep 05 '16 17:09 iamvery

:+1: Overall

My only concern would be that elixir standard library does not provide functionality to manipulate dates and times. I wonder how far these koans could go when the only thing you can do with standard Elixir is construct date/time structs? Thoughts?

ukutaht avatar Sep 07 '16 00:09 ukutaht

@ukutaht I'm not thinking about them as a standalone koan for now, and I guess in some future version of elixir more support for dates and times will be added and than it can be extended

for now it's only basic things. to/from date/time, sigils, Calendar, time_zone(), year(), maybe utc_now() and difference between DateTime and NaiveDateTime

art4ride avatar Sep 07 '16 06:09 art4ride

Elixir 1.5 added introduced som date/time arithematics to the standard library. See here. It might be enough to start writing exercises for it. A major issue here will be our elixir version requirement. I don't see enough reasons to restrict this project to elixir > 1.5, but think about building a mechanism to skip lessons based on elixir version. What do you think? Do you see other use cases for something like this?

Nagasaki45 avatar Aug 11 '17 13:08 Nagasaki45