Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Jul 1, 2024

Conversation

Dushusir
Copy link
Member

@Dushusir Dushusir commented Jun 24, 2024

Features

  • NOW
  • TIME
  • DATEVALUE
  • TIMEVALUE

Fixed issues

  1. close [Bug] The formula is equal to the selection, and the expected formula result displays the number format #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

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

Copy link

codecov bot commented Jun 24, 2024

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 ⚠️
packages/engine-formula/src/basics/date.ts 77.77% 4 Missing ⚠️
...c/engine/reference-object/base-reference-object.ts 55.55% 4 Missing ⚠️
.../engine-formula/src/engine/ast-node/suffix-node.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Jun 24, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@Dushusir Dushusir marked this pull request as ready for review June 24, 2024 13:24
@Dushusir Dushusir requested a review from DR-Univer as a code owner June 24, 2024 13:24
@Dushusir Dushusir changed the title feat(formula): add now function feat(formula): add now,time,datevalue,timevalue function Jun 24, 2024
@Dushusir Dushusir added the qa:untested This PR is ready to be tested label Jun 24, 2024
@oumomomo
Copy link

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

@univer-bot
Copy link

univer-bot bot commented Jun 25, 2024

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

@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label Jun 26, 2024
@Dushusir Dushusir force-pushed the dushusir/formula-related-0625 branch from 89ccd39 to ae77065 Compare June 29, 2024 09:57
@Dushusir
Copy link
Member Author

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

This problem and issue #1999 have been fixed

@univer-bot
Copy link

univer-bot bot commented Jun 29, 2024

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 #1999 have been fixed

@Dushusir Dushusir added qa:untested This PR is ready to be tested and removed qa:rejected labels Jun 29, 2024
@univer-bot
Copy link

univer-bot bot commented Jun 29, 2024

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

  • NOW
  • TIME
  • DATEVALUE
  • TIMEVALUE

Fixed issues

  1. close [Bug] The formula is equal to the selection, and the expected formula result displays the number format #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

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins , commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

@oumomomo oumomomo added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Jul 1, 2024
@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label Jul 1, 2024
@Dushusir Dushusir force-pushed the dushusir/formula-related-0625 branch from 24490d6 to eff86f7 Compare July 1, 2024 08:59
@Dushusir Dushusir merged commit fbf4548 into dev Jul 1, 2024
9 checks passed
@Dushusir Dushusir deleted the dushusir/formula-related-0625 branch July 1, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] The formula is equal to the selection, and the expected formula result displays the number format
3 participants