Code Monkey home page Code Monkey logo

time_window's Introduction

Find out the time windows, the current time or any given time fall within.

The defined time windows are:

Mon 1800-2000

Sat-Sun

Mon-Fri 0800-1700

Mon-Sun 0600-0700

Fri-Sat 1900-2200

Examples :- Time Time Windows 2015-06-29 11:58:47 - ["Mon-Fri 0800-1700", "0800-1700"] 2015-06-27 06:20:07 - ["Sat-Sun", "Mon-Sun 0600-0700"] 2015-05-07 20:10:40 - []

Inputs: inputs/input_time_windows.txt - Each line has the input time windows Mon 1800-2000 Sat-Sun
Mon-Fri 0800-1700 Mon-Sun 0600-0700 Fri-Sat 1900-2200

inputs/input_times.txt - Each line in this file is matched against the time windows 2015-06-29 11:58:47 2015-06-27 06:20:07 2015-05-07 20:10:40

Run the following file to execute. ruby bin/time_window.rb

time_window's People

Contributors

sureshggg avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.