qdate

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(valueStr, formatStr string) (time.Time, error)

Parse

@Description: 字符串转换为时间
@param valueStr 时间
@param formatStr 格式化串 可以是yyyy/MM/dd HH:mm:ss 或者 yyyy-MM-dd HH:mm:ss:fff等
@return time.Time
@return error

func ToNumber

func ToNumber(valueStr, formatStr string) (uint64, error)

ToNumber

@Description: 将时间字符串转为数值形式,如20230101
@return uint64
@return error

func ToString

func ToString(value time.Time, formatStr string) string

ToString

@Description: 转化为字符串
@param value 时间
@param formatStr 格式化串 可以是yyyy/MM/dd HH:mm:ss 或者 yyyy-MM-dd HH:mm:ss:fff等
@return string

Types

This section is empty.

Jump to

Keyboard shortcuts

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