yeeTime

package
v0.0.0-...-89bd919 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

*

  • Created by angelina-zf on 17/2/27.

Index

Constants

View Source
const (
	FormatMysqlZero        = "0000-00-00 00:00:00"
	FormatMysql            = "2006-01-02 15:04:05"
	FormatMysqlUs          = "2006-01-02 15:04:05.999999"
	FormatMysqlDate        = "2006-01-02"
	FormatMysqlMinute      = "2006-01-02 15:04"
	FormatMysqlMouthAndDay = "01-02"
)

Variables

This section is empty.

Functions

func DateFormat

func DateFormat(t time.Time, format string) string

DateFormat 格式化时间 MM - month - 01 M - month - 1, single bit DD - day - 02 D - day 2 YYYY - year - 2006 YY - year - 06 HH - 24 hours - 03 H - 24 hours - 3 hh - 12 hours - 03 h - 12 hours - 3 mm - minute - 04 m - minute - 4 ss - second - 05 s - second = 5

func Day

func Day() int

Day 获取本日

func Month

func Month() time.Month

Month 获取本月

func TimeToUnixS

func TimeToUnixS(t time.Time) string

TimeToUnix 转换为10位的unix时间戳 精确到秒

func UnixSToTime

func UnixSToTime(st string) time.Time

UnixSToTime 10位的unix时间戳转换为time.Time

func Week

func Week() time.Weekday

Week 获取本日在这周是周几

func Year

func Year() int

Year 获取本年 整型

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL