Jump to content

Service Flag date input for Holidays


DanielA
 Share

Recommended Posts

I'm in Australia, and in the system settings we have the date format set as "DD.MM.YYYY"

When editing a Service Flag, you have to input it as "MM.DD.YYYY"

Is it possible to have the date input for holidays reflect the "Date format" that is set for the server?

Link to comment
Share on other sites

When I attempted this earlier this month, (05/03/2021), if I set the date to 05/03 and the service flag showed the incorrect status.

I changed it to 03/05 and the flag status shows active.

 

Today, testing it out (13/03/2021), the form validation will not allow the date to be input as 13/03 or 13/03/2021.

If i input the date as 03/13/2021, the flag status changes.

Link to comment
Share on other sites

Oh, you need to enter the date as "5.3.2021" — this is the sign that the format is DD.MM.YYYY. If you use slashes, the PBX assumes the format MM/DD/YYYY. You can actually try to enter January 31, the form validation will reject the wrong format then.

Link to comment
Share on other sites

So the most common date format in the world it DD/MM/YYYY?
I don't know why you would assume that because the date format uses a forward slash, it must be MM/DD/YYYY ?

I've just checked the DD.MM.YYYY format - The form validates it correctly, however, the service flag does not work.

Today is Sunday the 14th March. I input the holiday date as 14.03 and also tried 14.03.2021 - No flag.
I even tried 03/14 and 03/14/2021 and they didn't work either?

If I add business hours to the Sunday field, I get the flag.
Seems a bit weird.

Rather than trying to deal with localisation and multiple date formats, would it be better to just follow the ISO date format of YYYY-MM-DD and use a date selector?

Link to comment
Share on other sites

It is confusing. The only way to get out of this is to choose internally a format like YYYYMMDD and then have the front end handle it based on the locale. YYYY-MM-DD is not possible because we also support date ranges that use the hyphen between the dates. Lets try guessing the locale and re-format it internally to YYYYMMDD in the 67.1 build.

Link to comment
Share on other sites

That sounds like it wouldn't be a bad idea.
Could I suggest that rather than "guessing" the locale, that it is a configurable option.
You could "guess" a locale initially, but if its guessed incorrectly, it needs to be easily changed/corrected.

Is it possible to include a time in the service flag?
i.e business closes at 5pm on 19/03/2021 and re-opens at 9am 22/03/2021.
so you could input a range something like "19/03/2021 17:00 - 22/03/2021 09:00" ?

It would also be good if there was a way to set a holiday in a format like "the first Tuesday in November."
We have a few holidays where the actual date varies each year in this kind of manner (as I'm sure other countries would also.)
Don't know if something like that could be included in a future build?

Link to comment
Share on other sites

 

In the next version (67.1 and later) you can use the form validation for December 31 to see if you enter it the right way. Internally it will be represented as YYYYMMDD, so you could grep in the file system in the service flag to see what was actually stored. 

Yes you can include a time in a service flag. For example 12/24;2P would mean (in US locale) 2PM on December 24. Your example should be "19/03/2021;17:00-22/03/2021;09:00" and in the 67.0 notation "19.03.2021;17:00-22.03.2021;09:00"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...