DanielA Posted March 10, 2021 Report Share Posted March 10, 2021 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? Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted March 11, 2021 Report Share Posted March 11, 2021 We had addressed that in later versions (after October 2020). What version are you on right now? Quote Link to comment Share on other sites More sharing options...
DanielA Posted March 12, 2021 Author Report Share Posted March 12, 2021 Software version 67.0.1 (Debian64) Build date Feb 28 2021 13:43:26 Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted March 12, 2021 Report Share Posted March 12, 2021 We actually tested it here and it did seem to work... Is the problem the form validation in the browser or does the service flag not show the right status? Quote Link to comment Share on other sites More sharing options...
DanielA Posted March 12, 2021 Author Report Share Posted March 12, 2021 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. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted March 13, 2021 Report Share Posted March 13, 2021 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. Quote Link to comment Share on other sites More sharing options...
DanielA Posted March 13, 2021 Author Report Share Posted March 13, 2021 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? Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted March 14, 2021 Report Share Posted March 14, 2021 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. Quote Link to comment Share on other sites More sharing options...
DanielA Posted March 15, 2021 Author Report Share Posted March 15, 2021 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? Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted March 15, 2021 Report Share Posted March 15, 2021 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" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.