Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eugenehp/elixirscheduleplayground
Elixir Schedule Playground
https://github.com/eugenehp/elixirscheduleplayground
Last synced: 3 days ago
JSON representation
Elixir Schedule Playground
- Host: GitHub
- URL: https://github.com/eugenehp/elixirscheduleplayground
- Owner: eugenehp
- Created: 2015-08-25T11:43:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-25T11:49:36.000Z (about 9 years ago)
- Last Synced: 2023-04-10T05:52:15.633Z (over 1 year ago)
- Language: Elixir
- Size: 133 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Elixir Schedule Playground
================Works with the following JSON structure of the schedule.
Use `ElixirSchedulePlayground.test/1` where you send your JSON formated schedule like this:
```
{
"tuesday": [
"2:00-4:00",
"18:00-20:00"
],
"thursday": [
"2:20-4:50",
"18:01-20:59"
],
"sunday": [
"0:00-24:00"
]
}
```It use only `UTC` timezone to do the comparison and returns `:true` if `now` fits the schedule or `:false` if it's not.
#Installation
```
mix deps.clean
mix deps.get
mix compile
```#Usage
```
iex -S mixiex(1)> ElixirSchedulePlayground.test
:trueiex(1)> ElixirSchedulePlayground.test "{\"tuesday\":[\"0:10-4:33\",\"12:10-23:59\"],\"thursday\":[\"2:20-4:50\",\"18:01-20:59\"],\"sunday\":[\"0:00-24:00\"]}"
:false
```#License
© 2015 Eugene Hauptmann
MIT