utctime

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2015 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package utctime provides functionality for displaying time.

Index

Constants

View Source
const (
	Default     = "2006-01-02 15:04:05.000"
	NoDelimiter = "20060102150405.000"
	Date8Num    = "20060102"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UTCTime

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

func Now

func Now() *UTCTime

Now creates UTCTime object with current UTC time.

func Parse

func Parse(layout, value string) (UTCTime, error)

Parse parses value as UTC. The layout defines the format by showing how the reference time.

If you need more information of layout, look document for time.Time#Parse.

func ParseLocaltime

func ParseLocaltime(layout, value string) (UTCTime, error)

ParseLocaltime parses value as localtime.

func (UTCTime) AddDays

func (u UTCTime) AddDays(days int) UTCTime

AddDays returns UTCTime that has tm after days from u.tm

func (UTCTime) Format

func (u UTCTime) Format(layout string) string

Format returns a textual representation of the utc time value formatted according to layout.

func (UTCTime) FormatLocaltime

func (u UTCTime) FormatLocaltime(layout string) string

FormatLocaltime returns a textual representation of the local time value formatted according to layout.

func (UTCTime) String

func (u UTCTime) String() string

String returns the time formatted using the Default layout.

Jump to

Keyboard shortcuts

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