Last active
June 16, 2019 21:01
-
-
Save cacheflow/1697d452762eedec6f3b09dadd970124 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Scheduler } = require('@ssense/sscheduler'); | |
let scheduler = new Scheduler(); | |
let availability = scheduler.getAvailability({ | |
from: '2017-02-01', | |
to: '2017-02-02', | |
duration: 30, | |
interval: 30, | |
schedule: { | |
weekdays: { | |
from: '09:00', to: '17:00', | |
unavailability: [ | |
{ from: '12:00', to: '13:00' } | |
] | |
}, | |
unavailability: [ | |
// two different types of unavailability structure | |
{ from: '2017-02-20 00:00', to: '2017-02-27 00:00' }, | |
{ date: '2017-02-15', from: '12:00', to: '13:00' } | |
], | |
allocated: [ | |
{ from: '2017-02-01 13:00' , duration: 60 }, | |
{ from: '2017-02-01 14:00' , duration: 60 } | |
] | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment