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

add compare_date dojo #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions compare_date/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## 问题
给定一个时间格式的字符串,例如"2017-4-12"。
现在的需求是需要判断这个日期跟今天的日期的比较结果,并输入他们谁在先,谁在后,并且打印这两个日期是否是润年。

### 例子
输入:

`2016-04-04`

输出:


{
input:true, // 输入的日期是否是润年
today:false, // 今天是否是润年
compare:"before"// 输入的日期跟今天的日期比较的结果 ("before"|"after"|"equal")
}