util

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2013 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Tz = time.Now().Location()

In reality the time zone used here doesn't matter, and it shouldn't cause problems when switching to DST. This is used just so the timezone used will have some correlation with the local one.

Functions

func GetFileType

func GetFileType(filename string) string

func IsNewer

func IsNewer(a, b string) (bool, error)

Returns true if the file on path a was modified later than the file on path b. If an error is encountered, returns false and the error.

func NormalizeDate

func NormalizeDate(t time.Time) time.Time

NormalizeDate strips the time part from time.Date leaving only year, month and day.

func NormalizeTime

func NormalizeTime(t time.Time) time.Time

NormalizeTime strips the date part from time.Date leaving only hours, minutes, seconds and nanoseconds. If forceTZ is true, its location will be set to util.Tz, if false, it will be left as is.

Types

This section is empty.

Jump to

Keyboard shortcuts

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