Skip to content

Instantly share code, notes, and snippets.

@Jeweller-Tsai
Created August 6, 2016 06:04
Show Gist options
  • Save Jeweller-Tsai/52836b265a25532408364362a489cb3d to your computer and use it in GitHub Desktop.
Save Jeweller-Tsai/52836b265a25532408364362a489cb3d to your computer and use it in GitHub Desktop.
defmodule DateRange do
defstruct first: nil, last: nil
end
d1 = ~D[2016-07-01]
d2 = ~D[2016-07-31]
%DateRange{first: d1, last: d2} # => %DateRange{first: ~D[2016-07-01], last: ~D[2016-07-31]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment