Skip to content

JS:获取某一天的前三天和后三天的日期 #63

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

Open
smileyby opened this issue May 25, 2021 · 0 comments
Open

JS:获取某一天的前三天和后三天的日期 #63

smileyby opened this issue May 25, 2021 · 0 comments
Labels

Comments

@smileyby
Copy link
Owner

思路,通过获取当前日的时间戳,然后加减1/2/3天的时间戳,再通过Date来获取到对应的日期即可
这样,避免了边界判断

threeday

问题来自掘金沸点:https://juejin.im/pin/5ee1978851882551517fdcec

@smileyby smileyby added the JavaScript ☀️ JavaScript label May 25, 2021
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

1 participant