Open
Conversation
Open
Owner
|
/codex |
Author
|
以下のように
変更後の該当部分: func main() {
now := time.Now()
fmt.Println("The time is", now)
fmt.Println("7 days later:", now.AddDate(0, 0, 7))
fmt.Println("10 days later:", now.AddDate(0, 0, 10))
fmt.Println("14 days later:", now.AddDate(0, 0, 14))
fmt.Println("30 days later:", now.AddDate(0, 0, 30)) // 追加
}ご確認ください。 Codex Result |
Owner
|
/codex 1年後の時刻も出してください。また、日本語で表示してください。 |
Author
|
変更後の該当部分: func main() {
now := time.Now()
fmt.Println("現在時刻:", now)
fmt.Println("7日後:", now.AddDate(0, 0, 7))
fmt.Println("10日後:", now.AddDate(0, 0, 10))
fmt.Println("14日後:", now.AddDate(0, 0, 14))
fmt.Println("30日後:", now.AddDate(0, 0, 30))
fmt.Println("1年後:", now.AddDate(1, 0, 0))
}ご確認ください。 Codex Result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applied changes based on Issue #82.
以下のとおり
main.goを修正し、現在時刻に加えて7日後・10日後・14日後の時刻を表示するようにしました。time.Now()を変数nowに格納fmt.Println("The time is", now)に変更now.AddDate(0, 0, N)を使って 7日後・10日後・14日後の時刻をそれぞれ出力修正済みファイル:
ご確認ください。
Codex Result