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

Time formatting fun #61

Closed
7 tasks done
stephenharris opened this issue Mar 17, 2013 · 3 comments
Closed
7 tasks done

Time formatting fun #61

stephenharris opened this issue Mar 17, 2013 · 3 comments
Milestone

Comments

@stephenharris
Copy link
Owner

There isn't a standard of default time format in EO. While all date/time formatting on the front-end is changeable - there should perhaps be a 'unified' default value. For example

  • Page templates use 'j F Y g:ia'
  • Event admin page & event list Shortcodes/widgets use the WordPress settings
  • fullCalendar uses the 24 hour time by default. Can be edited with 'timeformat' attribute
  • admin Calendar can be switched between 24/12 hour via screen options on that page

(See this thread).

For admin-side, determining whether 24 or 12 hour time should be used should be taken from the time setting option.

Possible problems:

  • Time setting is for display, so it may be 12 hour, while admins may prefer entering in 24 hour.
  • Some languages don't have 'am' or 'pm' - they use 24 hour.

Would require a function which takes a string (time format) and outputs whether its using 12 or 24 hour time.

An option could be added to the settings page to change this 'guess' manually - but do we really want another option...?

Pull requests, welcome!

Todo

  • Create function to check if blog is using 24/12 hour time: eventorganiser_blog_is_24()
  • Default templates should use get_option('time_format')
  • Default time format for agenda should be based on eventorganiser_blog_is_24()
  • Default calendar time format should be based on get_option('time_format')
  • Admin calendar 12/24 hour screen option should be based on eventorganiser_blog_is_24() (and possibly removed)
  • Default formats of event list shortcode/widgets should be get_option('time_format')
  • Maybe: Allow input of time formats in 12/24 format.
@bburtraw
Copy link

PLEASE give 'backwards' Americans a universal option to change the time format, like you do the date format on the settings page. Would be ever SO appreciated. I want to use this with a client's site, but that 'Add Event' page with 24-hour format input is keeping me from using it. .. Unless there's a way to change it that I haven't found. THanks.

@stephenharris
Copy link
Owner Author

@bburtraw Currently the time option on the add event page is 24-hour only. I hope to update this soon so as to make an educated guess as to whether 12 or 24 hour time should be used.

@stephenharris
Copy link
Owner Author

Allow 12 or 24 hour time format input: a1ff8de

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

No branches or pull requests

2 participants