atabary / timex-interval Goto Github PK
View Code? Open in Web Editor NEWA date/time interval library for Elixir projects, based on Timex.
License: Apache License 2.0
A date/time interval library for Elixir projects, based on Timex.
License: Apache License 2.0
I've tried your examples, but this one doesn't work
$ iex --version
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Elixir 1.0.5
$ grep timex mix.lock
"timex": {:hex, :timex, "0.16.2"},
"timex_interval": {:git, "git://github.com/atabary/timex-interval.git", "d599d888cdb26fac68e500a24f21f7f3155a3a85", []},
iex(4)> use Timex
nil
iex(5)> alias TimexInterval.DateTimeInterval, as: Interval
nil
iex(6)> Interval.new(from: Date.from({2014, 9, 22}), until: [days: 3]) |> Enum.map(fn(dt) -> DateFormat.format!(dt, "%Y-%m-%d", :strftime) end)
** (Protocol.UndefinedError) protocol Enumerable not implemented for %TimexInterval.DateTimeInterval{from: %Timex.DateTime{calendar: :gregorian, day: 22, hour: 0, minute: 0, month: 9, ms: 0, second: 0, timezone: %Timex.TimezoneInfo{abbreviation: "UTC", from: :min, full_name: "UTC", offset_std: 0, offset_utc: 0, until: :max}, year: 2014}, left_open: false, right_open: true, step: [days: 1], until: %Timex.DateTime{calendar: :gregorian, day: 25, hour: 0, minute: 0, month: 9, ms: 0, second: 0, timezone: %Timex.TimezoneInfo{abbreviation: "UTC", from: :min, full_name: "UTC", offset_std: 0, offset_utc: 0, until: :max}, year: 2014}}
(elixir) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir) lib/enum.ex:112: Enumerable.reduce/3
(elixir) lib/enum.ex:981: Enum.map/2
Hi, are there plans for 1.1 compatibility? Right now it does not build because of access protocol issues.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.