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

toFixed问题 #107

Closed
IShinji opened this issue Feb 6, 2020 · 1 comment
Closed

toFixed问题 #107

IShinji opened this issue Feb 6, 2020 · 1 comment
Assignees
Labels

Comments

@IShinji
Copy link

IShinji commented Feb 6, 2020

问题cr: f899861
现在ts里写的是
parseInt((Date.now() / 1000).toFixed(0), 10)
之前的编译结果是
intval(round((\Ts2Php_Date::now() / 1000), 0)) )
上述cr合入之后,编译结果变为
intval(number_format((\Ts2Php_Date::now() / 1000), 0))

导致返回始终为1。
原因为:
round返回的是number,比如 1000
number_format返回的是返回的是以千位分隔符方式格式化的一个数字字符串,比如 '1,000'

应该把number_format之后的结果去掉','并转为数字

@meixg meixg self-assigned this Feb 6, 2020
@cxtom cxtom closed this as completed in 82e326a Feb 7, 2020
cxtom added a commit that referenced this issue Feb 7, 2020
cxtom pushed a commit that referenced this issue Feb 8, 2020
## [0.19.13](v0.19.12...v0.19.13) (2020-02-08)

### Bug Fixes

* [#107](#107) ([82e326a](82e326a))
@cxtom
Copy link
Collaborator

cxtom commented Feb 8, 2020

🎉 This issue has been resolved in version 0.19.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

@cxtom cxtom added the released label Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants