Skip to content

Commit

Permalink
Update content about instantiate model
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Oct 10, 2023
1 parent 58e5a65 commit 2489367
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 50 deletions.
32 changes: 16 additions & 16 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -1263,22 +1263,22 @@ type Person struct {
person := Person {
Name: "gouguoyin",
Age: 18,
Birthday1: carbon.DateTime(carbon.Now().SubYears(18)),
Birthday2: carbon.DateTimeMilli(carbon.Now().SubYears(18)),
Birthday3: carbon.DateTimeMicro(carbon.Now().SubYears(18)),
Birthday4: carbon.DateTimeNano(carbon.Now().SubYears(18)),
GraduatedAt1: carbon.Date(carbon.Now()),
GraduatedAt2: carbon.DateMilli(carbon.Now()),
GraduatedAt3: carbon.DateMicro(carbon.Now()),
GraduatedAt4: carbon.DateNano(carbon.Now()),
OperatedAt1: carbon.Time(carbon.Now()),
OperatedAt2: carbon.TimeMilli(carbon.Now()),
OperatedAt3: carbon.TimeMicro(carbon.Now()),
OperatedAt4: carbon.TimeNano(carbon.Now()),
CreatedAt1: carbon.Timestamp(carbon.Now()),
CreatedAt2: carbon.TimestampMilli(carbon.Now()),
CreatedAt3: carbon.TimestampMicro(carbon.Now()),
CreatedAt4: carbon.TimestampNano(carbon.Now()),
Birthday1: carbon.DateTime{carbon.Now().SubYears(18)},
Birthday2: carbon.DateTimeMilli{carbon.Now().SubYears(18)},
Birthday3: carbon.DateTimeMicro{carbon.Now().SubYears(18)},
Birthday4: carbon.DateTimeNano{carbon.Now().SubYears(18)},
GraduatedAt1: carbon.Date{carbon.Now()},
GraduatedAt2: carbon.DateMilli{carbon.Now()},
GraduatedAt3: carbon.DateMicro{carbon.Now()},
GraduatedAt4: carbon.DateNano{carbon.Now()},
OperatedAt1: carbon.Time{carbon.Now()},
OperatedAt2: carbon.TimeMilli{carbon.Now()},
OperatedAt3: carbon.TimeMicro{carbon.Now()},
OperatedAt4: carbon.TimeNano{carbon.Now()},
CreatedAt1: carbon.Timestamp{carbon.Now()},
CreatedAt2: carbon.TimestampMilli{carbon.Now()},
CreatedAt3: carbon.TimestampMicro{carbon.Now()},
CreatedAt4: carbon.TimestampNano{carbon.Now()},
}
```

Expand Down
32 changes: 16 additions & 16 deletions README.jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -1261,22 +1261,22 @@ type Person struct {
person := Person {
Name: "gouguoyin",
Age: 18,
Birthday1: carbon.DateTime(carbon.Now().SubYears(18)),
Birthday2: carbon.DateTimeMilli(carbon.Now().SubYears(18)),
Birthday3: carbon.DateTimeMicro(carbon.Now().SubYears(18)),
Birthday4: carbon.DateTimeNano(carbon.Now().SubYears(18)),
GraduatedAt1: carbon.Date(carbon.Now()),
GraduatedAt2: carbon.DateMilli(carbon.Now()),
GraduatedAt3: carbon.DateMicro(carbon.Now()),
GraduatedAt4: carbon.DateNano(carbon.Now()),
OperatedAt1: carbon.Time(carbon.Now()),
OperatedAt2: carbon.TimeMilli(carbon.Now()),
OperatedAt3: carbon.TimeMicro(carbon.Now()),
OperatedAt4: carbon.TimeNano(carbon.Now()),
CreatedAt1: carbon.Timestamp(carbon.Now()),
CreatedAt2: carbon.TimestampMilli(carbon.Now()),
CreatedAt3: carbon.TimestampMicro(carbon.Now()),
CreatedAt4: carbon.TimestampNano(carbon.Now()),
Birthday1: carbon.DateTime{carbon.Now().SubYears(18)},
Birthday2: carbon.DateTimeMilli{carbon.Now().SubYears(18)},
Birthday3: carbon.DateTimeMicro{carbon.Now().SubYears(18)},
Birthday4: carbon.DateTimeNano{carbon.Now().SubYears(18)},
GraduatedAt1: carbon.Date{carbon.Now()},
GraduatedAt2: carbon.DateMilli{carbon.Now()},
GraduatedAt3: carbon.DateMicro{carbon.Now()},
GraduatedAt4: carbon.DateNano{carbon.Now()},
OperatedAt1: carbon.Time{carbon.Now()},
OperatedAt2: carbon.TimeMilli{carbon.Now()},
OperatedAt3: carbon.TimeMicro{carbon.Now()},
OperatedAt4: carbon.TimeNano{carbon.Now()},
CreatedAt1: carbon.Timestamp{carbon.Now()},
CreatedAt2: carbon.TimestampMilli{carbon.Now()},
CreatedAt3: carbon.TimestampMicro{carbon.Now()},
CreatedAt4: carbon.TimestampNano{carbon.Now()},
}
```

Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1254,24 +1254,24 @@ type Person struct {
###### Instantiate model
```go
person := Person {
Name: "gouguoyin",
Age: 18,
Birthday1: carbon.DateTime(carbon.Now().SubYears(18)),
Birthday2: carbon.DateTimeMilli(carbon.Now().SubYears(18)),
Birthday3: carbon.DateTimeMicro(carbon.Now().SubYears(18)),
Birthday4: carbon.DateTimeNano(carbon.Now().SubYears(18)),
GraduatedAt1: carbon.Date(carbon.Now()),
GraduatedAt2: carbon.DateMilli(carbon.Now()),
GraduatedAt3: carbon.DateMicro(carbon.Now()),
GraduatedAt4: carbon.DateNano(carbon.Now()),
OperatedAt1: carbon.Time(carbon.Now()),
OperatedAt2: carbon.TimeMilli(carbon.Now()),
OperatedAt3: carbon.TimeMicro(carbon.Now()),
OperatedAt4: carbon.TimeNano(carbon.Now()),
CreatedAt1: carbon.Timestamp(carbon.Now()),
CreatedAt2: carbon.TimestampMilli(carbon.Now()),
CreatedAt3: carbon.TimestampMicro(carbon.Now()),
CreatedAt4: carbon.TimestampNano(carbon.Now()),
Name: "gouguoyin",
Age: 18,
Birthday1: carbon.DateTime{carbon.Now().SubYears(18)},
Birthday2: carbon.DateTimeMilli{carbon.Now().SubYears(18)},
Birthday3: carbon.DateTimeMicro{carbon.Now().SubYears(18)},
Birthday4: carbon.DateTimeNano{carbon.Now().SubYears(18)},
GraduatedAt1: carbon.Date{carbon.Now()},
GraduatedAt2: carbon.DateMilli{carbon.Now()},
GraduatedAt3: carbon.DateMicro{carbon.Now()},
GraduatedAt4: carbon.DateNano{carbon.Now()},
OperatedAt1: carbon.Time{carbon.Now()},
OperatedAt2: carbon.TimeMilli{carbon.Now()},
OperatedAt3: carbon.TimeMicro{carbon.Now()},
OperatedAt4: carbon.TimeNano{carbon.Now()},
CreatedAt1: carbon.Timestamp{carbon.Now()},
CreatedAt2: carbon.TimestampMilli{carbon.Now()},
CreatedAt3: carbon.TimestampMicro{carbon.Now()},
CreatedAt4: carbon.TimestampNano{carbon.Now()},
}
```

Expand Down

0 comments on commit 2489367

Please sign in to comment.