Open Dushusir opened 7 months ago
@zhaolixin7 @Ella1117 需要一些调研,看是否匹配excel
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@zhaolixin7 @Ella1117 Need some research to see if it matches excel
/
和 -
的格式差异,解析时间的时候在不同浏览器上也不同表现,可以参考 https://segmentfault.com/a/1190000022403847
或许可以降低出错概率
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
The format difference between
/
and-
will also behave differently in different browsers when parsing the time. Please refer to https://segmentfault.com/a/1190000022403847. Perhaps the probability of error can be avoided
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Origin Title: [Feature] 关于输入日期内容自动转化数字格式的讨论
Title: [Feature] Discussion on automatic conversion of input date content into digital format
Enter 2020-1-1
, univer will recognize it as a date format, but the display will still be 2020-1-1
,
Enter 2020-01-01
, univer will recognize it as a date format, but the display will still be 2020-01-01
,
Enter 2020/01/01
, univer will recognize it as a date format, but the display will still be 2020/01/01
,
Enter 2020-1-1
, excel will become 2020/1/1
Enter 2020-01-01
, excel will become 2020/1/1
Enter 2020/01/01
, excel will become 2020/1/1
Something like "January 1, 2020" will also be recognized as a date, which requires internationalization issues to be considered.
初始清单
问题
输入
2020-1-1
, univer 会识别为日期格式,但是展示仍然是2020-1-1
, 输入2020-01-01
, univer 会识别为日期格式,但是展示仍然是2020-01-01
, 输入2020/01/01
, univer 会识别为日期格式,但是展示仍然是2020/01/01
,解决方案
输入
2020-1-1
, excel 会变成2020/1/1
输入2020-01-01
, excel 会变成2020/1/1
输入2020/01/01
, excel 会变成2020/1/1
更多思考
类似 "2020年1月1日" 也会识别为日期,这就要考虑国际化问题