Skip to content

Commit

Permalink
Update content about JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Nov 25, 2024
1 parent fbe244a commit 8b30a60
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 51 deletions.
32 changes: 16 additions & 16 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -1233,22 +1233,22 @@ person := Person {
Name: "gouguoyin",
Age: 18,
Birthday0: carbon.Now().SubYears(18),
Birthday1: carbon.Now().SubYears(18).ToDateTimeStruct(),
Birthday2: carbon.Now().SubYears(18).ToDateTimeMilliStruct(),
Birthday3: carbon.Now().SubYears(18).ToDateTimeMicroStruct(),
Birthday4: carbon.Now().SubYears(18).ToDateTimeNanoStruct(),
GraduatedAt1: carbon.Now().ToDateStruct(),
GraduatedAt2: carbon.Now().ToDateMilliStruct(),
GraduatedAt3: carbon.Now().ToDateMicroStruct(),
GraduatedAt4: carbon.Now().ToDateNanoStruct(),
OperatedAt1: carbon.Now().ToTimeStruct(),
OperatedAt2: carbon.Now().ToTimeMilliStruct(),
OperatedAt3: carbon.Now().ToTimeMicroStruct(),
OperatedAt4: carbon.Now().ToTimeNanoStruct(),
CreatedAt1: carbon.Now().ToTimestampStruct(),
CreatedAt2: carbon.Now().ToTimestampMilliStruct(),
CreatedAt3: carbon.Now().ToTimestampMicroStruct(),
CreatedAt4: carbon.Now().ToTimestampNanoStruct(),
Birthday1: carbon.NewDateTime(carbon.Now().SubYears(18)),
Birthday2: carbon.NewDateTimeMilli(carbon.Now().SubYears(18)),
Birthday3: carbon.NewDateTimeMicro(carbon.Now().SubYears(18)),
Birthday4: carbon.NewDateTimeNano(carbon.Now().SubYears(18)),
GraduatedAt1: carbon.NewDate(carbon.Now()),
GraduatedAt2: carbon.NewDateMilli(carbon.Now()),
GraduatedAt3: carbon.NewDateMicro(carbon.Now()),
GraduatedAt4: carbon.NewDateNano(carbon.Now()),
OperatedAt1: carbon.NewTime(carbon.Now()),
OperatedAt2: carbon.NewTimeMilli(carbon.Now()),
OperatedAt3: carbon.NewTimeMicro(carbon.Now()),
OperatedAt4: carbon.NewTimeNano(carbon.Now()),
CreatedAt1: carbon.NewTimestamp(carbon.Now()),
CreatedAt2: carbon.NewTimestampMilli(carbon.Now()),
CreatedAt3: carbon.NewTimestampMicro(carbon.Now()),
CreatedAt4: carbon.NewTimestampNano(carbon.Now()),
}

data, err := json.Marshal(&person)
Expand Down
38 changes: 19 additions & 19 deletions README.jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -1230,25 +1230,25 @@ type Person struct {
}

person := Person {
Name: "gouguoyin",
Age: 18,
Birthday0: carbon.Now().SubYears(18),
Birthday1: carbon.Now().SubYears(18).ToDateTimeStruct(),
Birthday2: carbon.Now().SubYears(18).ToDateTimeMilliStruct(),
Birthday3: carbon.Now().SubYears(18).ToDateTimeMicroStruct(),
Birthday4: carbon.Now().SubYears(18).ToDateTimeNanoStruct(),
GraduatedAt1: carbon.Now().ToDateStruct(),
GraduatedAt2: carbon.Now().ToDateMilliStruct(),
GraduatedAt3: carbon.Now().ToDateMicroStruct(),
GraduatedAt4: carbon.Now().ToDateNanoStruct(),
OperatedAt1: carbon.Now().ToTimeStruct(),
OperatedAt2: carbon.Now().ToTimeMilliStruct(),
OperatedAt3: carbon.Now().ToTimeMicroStruct(),
OperatedAt4: carbon.Now().ToTimeNanoStruct(),
CreatedAt1: carbon.Now().ToTimestampStruct(),
CreatedAt2: carbon.Now().ToTimestampMilliStruct(),
CreatedAt3: carbon.Now().ToTimestampMicroStruct(),
CreatedAt4: carbon.Now().ToTimestampNanoStruct(),
Name: "gouguoyin",
Age: 18,
Birthday0: carbon.Now().SubYears(18),
Birthday1: carbon.NewDateTime(carbon.Now().SubYears(18)),
Birthday2: carbon.NewDateTimeMilli(carbon.Now().SubYears(18)),
Birthday3: carbon.NewDateTimeMicro(carbon.Now().SubYears(18)),
Birthday4: carbon.NewDateTimeNano(carbon.Now().SubYears(18)),
GraduatedAt1: carbon.NewDate(carbon.Now()),
GraduatedAt2: carbon.NewDateMilli(carbon.Now()),
GraduatedAt3: carbon.NewDateMicro(carbon.Now()),
GraduatedAt4: carbon.NewDateNano(carbon.Now()),
OperatedAt1: carbon.NewTime(carbon.Now()),
OperatedAt2: carbon.NewTimeMilli(carbon.Now()),
OperatedAt3: carbon.NewTimeMicro(carbon.Now()),
OperatedAt4: carbon.NewTimeNano(carbon.Now()),
CreatedAt1: carbon.NewTimestamp(carbon.Now()),
CreatedAt2: carbon.NewTimestampMilli(carbon.Now()),
CreatedAt3: carbon.NewTimestampMicro(carbon.Now()),
CreatedAt4: carbon.NewTimestampNano(carbon.Now()),
}

data, err := json.Marshal(&person)
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1227,22 +1227,22 @@ person := Person {
Name: "gouguoyin",
Age: 18,
Birthday0: carbon.Now().SubYears(18),
Birthday1: carbon.Now().SubYears(18).ToDateTimeStruct(),
Birthday2: carbon.Now().SubYears(18).ToDateTimeMilliStruct(),
Birthday3: carbon.Now().SubYears(18).ToDateTimeMicroStruct(),
Birthday4: carbon.Now().SubYears(18).ToDateTimeNanoStruct(),
GraduatedAt1: carbon.Now().ToDateStruct(),
GraduatedAt2: carbon.Now().ToDateMilliStruct(),
GraduatedAt3: carbon.Now().ToDateMicroStruct(),
GraduatedAt4: carbon.Now().ToDateNanoStruct(),
OperatedAt1: carbon.Now().ToTimeStruct(),
OperatedAt2: carbon.Now().ToTimeMilliStruct(),
OperatedAt3: carbon.Now().ToTimeMicroStruct(),
OperatedAt4: carbon.Now().ToTimeNanoStruct(),
CreatedAt1: carbon.Now().ToTimestampStruct(),
CreatedAt2: carbon.Now().ToTimestampMilliStruct(),
CreatedAt3: carbon.Now().ToTimestampMicroStruct(),
CreatedAt4: carbon.Now().ToTimestampNanoStruct(),
Birthday1: carbon.NewDateTime(carbon.Now().SubYears(18)),
Birthday2: carbon.NewDateTimeMilli(carbon.Now().SubYears(18)),
Birthday3: carbon.NewDateTimeMicro(carbon.Now().SubYears(18)),
Birthday4: carbon.NewDateTimeNano(carbon.Now().SubYears(18)),
GraduatedAt1: carbon.NewDate(carbon.Now()),
GraduatedAt2: carbon.NewDateMilli(carbon.Now()),
GraduatedAt3: carbon.NewDateMicro(carbon.Now()),
GraduatedAt4: carbon.NewDateNano(carbon.Now()),
OperatedAt1: carbon.NewTime(carbon.Now()),
OperatedAt2: carbon.NewTimeMilli(carbon.Now()),
OperatedAt3: carbon.NewTimeMicro(carbon.Now()),
OperatedAt4: carbon.NewTimeNano(carbon.Now()),
CreatedAt1: carbon.NewTimestamp(carbon.Now()),
CreatedAt2: carbon.NewTimestampMilli(carbon.Now()),
CreatedAt3: carbon.NewTimestampMicro(carbon.Now()),
CreatedAt4: carbon.NewTimestampNano(carbon.Now()),
}

data, err := json.Marshal(&person)
Expand Down

0 comments on commit 8b30a60

Please sign in to comment.