S
S
Stanislav2017-01-21 16:51:13
MongoDB
Stanislav, 2017-01-21 16:51:13

What is the best way to store the parser traversal time interval?

Hi all.
I ran into a problem, there is a written parser for vk, and you need to make a bypass time interval, i.e. for example, so that on Monday it works only from 14:00 to 17:00, on Tuesday from 16:00 to 20:00, and so on.
I have never encountered this and I would like to ask how best to store all this data in the database for more flexible management.
Right now I'm leaning towards this option.

[
    ["Monday", "16:00", "20:00"],
    ["Tuesday", "17:00", "1800"],
    ["Wednesday", "12:00", "15:00"],
]

where:
1. Name of the week (more likely to be the week number)
2. Start time
3. End time
Maybe there are more interesting options, yet I have very little experience in this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nwton, 2017-01-21
@ms-dred

This option is quite workable. Use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question