Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working Hours #3

Open
missjwo opened this issue Apr 7, 2014 · 3 comments
Open

Working Hours #3

missjwo opened this issue Apr 7, 2014 · 3 comments
Labels

Comments

@missjwo
Copy link
Member

missjwo commented Apr 7, 2014

At the moment the spec seems to suggest that you only one start time and one end time.

Is it your intention to only have one of each or do you want to allow for users to create multiple start/end times.

A use of the latter idea is for a person who wants to do 4 hours from 6am-10am and then has errands to do and then goes back to work at 2pm-6pm.

The latter feature could always be implemented later but it could effect the design of the data storage now.

@joehoyle
Copy link
Member

joehoyle commented Apr 7, 2014

Funny you say that, I was literally thinking exactly this about an hour ago! Yeah, I think we should do it. Perhaps every user just has:

array(
    array( 'start_time => x, 'end_time' => 'x' ),
    array( 'start_time => x, 'end_time' => 'x' ),
    array( 'start_time => x, 'end_time' => 'x' )
)

Etc?

@missjwo
Copy link
Member Author

missjwo commented Apr 7, 2014

Your idea is pretty much how it would have to be if we are storing it in the user meta table - but serialised arrays can get so ugly so quick. Unfortunately, the build of a new table just for the plugin seems overkill though.

@joehoyle
Copy link
Member

joehoyle commented Apr 7, 2014

Hmm yeah, I don't see us wanting to query based off this data, so I don't see an immediate problem with serialized data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants