Documentation ¶
Index ¶
- Constants
- Variables
- func In(loc *time.Location)
- type Carbon
- func (c Carbon) Add(d time.Duration) *Carbon
- func (c *Carbon) Clone() *Carbon
- func (c *Carbon) Format(format string) string
- func (c Carbon) In(loc *time.Location) *Carbon
- func (c Carbon) Sub(d time.Duration) *Carbon
- func (c *Carbon) SubTime(t time.Time) time.Duration
- func (c *Carbon) Time() time.Time
Constants ¶
View Source
const ( Nanosecond = time.Nanosecond Microsecond = 1000 * Nanosecond Millisecond = 1000 * Microsecond Second = 1000 * Millisecond Minute = 60 * Second Hour = 60 * Minute Day = 24 * Hour Week = 7 * Day )
Variables ¶
View Source
var (
Shanghai, _ = time.LoadLocation("Asia/Shanghai")
)
Functions ¶
Types ¶
type Carbon ¶
type Carbon struct {
// contains filtered or unexported fields
}
Carbon
func (*Carbon) Format ¶
Format 格式化代码 c.Format("Y-m-d H:i:s") @see http://php.net/manual/zh/function.date.php#refsect1-function.date-parameters
Click to show internal directories.
Click to hide internal directories.