mirror of
https://gitee.com/dromara/carbon.git
synced 2024-11-29 18:57:37 +08:00
更新文档
This commit is contained in:
parent
aba5bd7d69
commit
cc78e6abf5
36
README.md
36
README.md
@ -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()},
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user