dream-num / univer

Univer is an open-source alternative to Google Sheets, Slides, and Docs
https://univer.ai
Apache License 2.0
5.68k stars 469 forks source link

feat(formula): add now,time,datevalue,timevalue function #2598

Closed Dushusir closed 1 day ago

Dushusir commented 1 week ago

Features

Fixed issues

  1. close #1999

  2. =DATEVALUE(A1),A1内容为"2020-1-1"时应该报错 企业微信截图_17193722277079

  3. =TODAY() 单元格下拉填充,先出现 "1900-01-00"再出现公式计算结果BUG 2024_6_29 14_14_45 video.webm

Pull Request Checklist

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 89.93289% with 15 lines in your changes missing coverage. Please review.

Project coverage is 27.09%. Comparing base (01c1b32) to head (eff86f7).

Files Patch % Lines
...es/engine-formula/src/functions/date/time/index.ts 90.19% 5 Missing :warning:
packages/engine-formula/src/basics/date.ts 77.77% 4 Missing :warning:
...c/engine/reference-object/base-reference-object.ts 55.55% 4 Missing :warning:
.../engine-formula/src/engine/ast-node/suffix-node.ts 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2598 +/- ## ========================================== + Coverage 27.00% 27.09% +0.09% ========================================== Files 1694 1698 +4 Lines 85225 85340 +115 Branches 17775 17805 +30 ========================================== + Hits 23011 23120 +109 - Misses 62214 62220 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 1 week ago

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link
oumomomo commented 1 week ago

NOW函数 1、输入=NOW()-0.5得出的计算结果为数值 企业微信截图_17193188336988 excel:为日期 企业微信截图_17193188137067

univer-bot[bot] commented 1 week ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

NOW function

  1. Enter =NOW()-0.5 and the calculated result is a numerical value. Enterprise WeChat screenshot_17193188336988 excel: for date Enterprise WeChat screenshot_17193188137067
Dushusir commented 3 days ago

NOW函数 1、输入=NOW()-0.5得出的计算结果为数值 企业微信截图_17193188336988 excel:为日期 企业微信截图_17193188137067

This problem and issue https://github.com/dream-num/univer/issues/1999 have been fixed

univer-bot[bot] commented 3 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

NOW函数 1、输入=NOW()-0.5得出的计算结果为数值 ! 6/342731032-eb9a3972-e7d6- 4441-85e1-b5d2aa579651.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvb SIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2NjYzOTYsIm5iZiI6MTcxOTY2NjA5NiwicGF0aCI6Ii 8xNjcxNzEzNTYvMzQyNzMxMDMyLWViOWEzOTcyLWU3ZDYtNDQ0MS04NWUxLWI1ZDJhYTU3OTY1MS5 wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD 1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3 M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQxMzAxMzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jOGRlZmY2MDI2NzM4NWVlNTFhYTE4MDU2MTUwMGVlZmMy Yjc0MjkxMTgzZjAzMTc0NjJjNGQ2MjFhYTliNjA5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9z dCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.0NfauEllwjx-B8xzModHdenhr_q F_9lAOM5ltQT-bvM) excel:为日期 ![企业微信截图_17193188137067](https://private-user-images.githubusercontent.com/167171356/ 342731108-89DBBE38-122A-43B1-Ed40-Ed873d1A04c8.png? 3LMDPDGH1YNVZZXJJB250ZW50LMNVSISIMTLESI6IMTLECLCLCLCLCLCLEHAIOGE3MTK2NJYZITYSIM5IZII6MTCXOTY2NJA5NIWICF0ACI6I8XNJCXNZNTYVMMZYZMXMTA4LTAG 5zgjiztm4lteymmetndnims1hzdqwvkodczdfhmdrjoc5wbmc_wc1bxotqwx RFLMU0E1M1BRSZRAQSUYRJIWMJQWNJI5JTJDXMTZWFZDCDC0xjtjgCMLMKZHD3M0X3JLCVLC3QMWC1BXOTRGF0ZTIDIDI0MDYOYOVQXMZAXMZALGTTTTTTTQW1LUV4 cglyzxm9mzawjlgttw16lvnpz25hdhvyzt0zode2zji5nnjfimzczwe0yze4y2y 6lvnpz25lzehlywrlcnm9ag9zdczhy3rvcl9pzd0wjmtlev9pzd0wjnjlcg9fawq9mc9.0cf-d5_xj13iswah0andhl8za2xhelaowaups_W_XTY)

This problem and issue https://github.com/dream-num/univer/issues/1999 have been fixed

univer-bot[bot] commented 3 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Origin Title: feat(formula): add now,time,datevalue,timevalue function

Title: feat(formula): add now,time,datevalue,timevalue function


Features

Fixed issues

  1. close #1999

  2. =DATEVALUE(A1), an error should be reported when the content of A1 is "2020-1-1" Enterprise WeChat screenshot_17193722277079

  3. =TODAY() cell drop-down filling, "1900-01-00" appears first and then the formula calculation result BUG 2024_6_29 14_14_45 video.webm

Pull Request Checklist