简体   繁体   English

Watson会话系统日期实体dateformat更改为“ /”和“-”

[英]Watson Conversation System date entity dateformat changes for '/' vs '-'

Watson Conversation System Entity sys-date is giving different results if I change '/' with '-' 如果我将“ /”更改为“-”,则沃森会话系统实体sys-date会给出不同的结果

As per documentation : 根据文档

Note: - For English locale only, the default system behavior for date input is MM/DD/YYYY. 注意:-仅对于英语语言环境,日期输入的默认系统行为是MM / DD / YYYY。 This will change to DD/MM/YYYY only if the first two numbers are greater than 12. The value stored will still be in the format "yyyy-MM-dd". 仅当前两个数字大于12时,此值才会更改为DD / MM / YYYY。存储的值仍将采用“ yyyy-MM-dd”格式。

However when i am testing with '-' its taking DD/MM/YYYY 但是,当我使用“-”进行测试时,其采用DD / MM / YYYY

12/01/2017 => 2017-12-01 (Correct) 12/01/2017 => 2017-12-01 (正确)

12-01-2017 => 2017-01-12 (incorrect) 12-01-2017 => 2017-01-12 (不正确)

Ideally Watson should interpret both as same dates as this '/', '-' will confuse the users. 理想情况下,沃森应将两个日期解释为相同的日期,因为此“ /”,“-”会使用户感到困惑。 Is there anyway to make it interpret as same dates. 无论如何,有没有将其解释为相同的日期。 Date Sample Screenshot 日期样本截图

AFAIK it is not possible to change the way the dates are interpreted in the shared version of IBM Watson Conversation Service (WCS). AFAIK无法更改IBM Watson Conversation Service(WCS)共享版本中日期的解释方式。 The date which you labeled as incorrect is actually correct when looking at ISO date formats . 在查看ISO日期格式时,您标记为不正确的日期实际上是正确的。

What you could do for your customization issue is to assess the metadata provided by WCS. 对于自定义问题,您可以做的是评估WCS提供的元数据。 You have access to the location information about where in a string the data was detected and also what exactly the user typed. 您可以访问有关在字符串中检测到数据的位置以及用户键入的确切信息的位置信息。 You could use that to interpret date values in the desired form. 您可以使用它以所需的形式解释日期值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM