timeHelper

package
v0.0.56 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDateFormat

func CheckDateFormat(date string) bool

CheckDateFormat 检查日期格式

func CheckDateTimeFormat

func CheckDateTimeFormat(dateTime string) bool

CheckDateTimeFormat 检查时间格式

func CurrentTimeH

func CurrentTimeH() string

CurrentTimeH 获取时

func CurrentTimeHI

func CurrentTimeHI() string

CurrentTimeHI 获取时分

func CurrentTimeHIS

func CurrentTimeHIS() string

CurrentTimeHIS 获取时分秒

func CurrentTimeYMD

func CurrentTimeYMD() string

CurrentTimeYMD 获取年月日

func CurrentTimeYMDHIS

func CurrentTimeYMDHIS() string

CurrentTimeYMDHIS 获取年月日时分秒

func FormatTimeInt64YMGHIS

func FormatTimeInt64YMGHIS(timestamp int64) string

func FormatTimeYMGHIS

func FormatTimeYMGHIS(timestamp time.Time) string

FormatTimeYMGHIS 获取指定时间戳的年月日时分秒

func FormatYMDHIS

func FormatYMDHIS(timing *time.Time) string

func GenerateFolderName

func GenerateFolderName() string

GenerateFolderName 生成一个基于当前时间的字符串数字,用作文件夹名

func GetCurrentTime

func GetCurrentTime() *time.Time

func GetCurrentYMDHIS

func GetCurrentYMDHIS() string

func StringToTime

func StringToTime(dateStr string) (time.Time, error)

StringToTime 封装方法,将日期字符串转换为 time.Time

Types

This section is empty.

Source Files

  • format.go
  • time.go

Jump to

Keyboard shortcuts

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