jtime

package module
v0.0.0-...-d47645b Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 3 Imported by: 5

Documentation

Overview

*************************************************************************** MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NowDate

func NowDate() string

func NowDateTime

func NowDateTime() string

func NowDateTimeWithFmt

func NowDateTimeWithFmt(f string) string

func NowDateWithFmt

func NowDateWithFmt(f string) string

func NowTime

func NowTime() string

func NowTimeWithFmt

func NowTimeWithFmt(f string) string

func ParseDate

func ParseDate(f string, s string) (time.Time, error)

func ParseDateTime

func ParseDateTime(f string, s string) (time.Time, error)

parse timestr to time add by yjh 211202

func ParseDateTimeFmt

func ParseDateTimeFmt(f string) string

func ParseTime

func ParseTime(f string, s string) (time.Time, error)

func UnixTime

func UnixTime() int64

func UnixTimeFrom

func UnixTimeFrom(s string) int64

func UnixTimeStr

func UnixTimeStr() string

func UnixTimeStrFrom

func UnixTimeStrFrom(s string) string

Types

type TimeCount

type TimeCount struct {
	// contains filtered or unexported fields
}

count time add by yjh 211125

func BuildTimeCount

func BuildTimeCount() *TimeCount

func (*TimeCount) Hours

func (t *TimeCount) Hours() float64

func (*TimeCount) Microseconds

func (t *TimeCount) Microseconds() int64

func (*TimeCount) Milliseconds

func (t *TimeCount) Milliseconds() int64

func (*TimeCount) Minutes

func (t *TimeCount) Minutes() float64

func (*TimeCount) Seconds

func (t *TimeCount) Seconds() float64

func (*TimeCount) Start

func (t *TimeCount) Start()

type TimeUtils

type TimeUtils struct {
	FormatDate     string
	FormatTime     string
	FormatDateTime string
}

parse time utils add by yjh 211124

func BuildTimeUtils

func BuildTimeUtils() *TimeUtils

func BuildTimeUtilsNoFmt

func BuildTimeUtilsNoFmt() *TimeUtils

* add by yjh 211124 * build

func (TimeUtils) Date

func (t TimeUtils) Date() string

parse date a dd by yjh 211124

func (TimeUtils) DateTime

func (t TimeUtils) DateTime() string

parse datetime add by yjh 211124

func (TimeUtils) DateTimeWithFmt

func (t TimeUtils) DateTimeWithFmt(f string) string

func (TimeUtils) DateWithFmt

func (t TimeUtils) DateWithFmt(f string) string

func (TimeUtils) Time

func (t TimeUtils) Time() string

parse time add by yjh 211124

func (TimeUtils) TimeWithFmt

func (t TimeUtils) TimeWithFmt(f string) string

parse datetime with fmt add by yjh 211124

Jump to

Keyboard shortcuts

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