util

package
v0.0.0-...-10d5746 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DateStringFormat = "2006-01-02"

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(array []string, search string) bool

func DateTime

func DateTime(datestr string) time.Time

func FormatDate

func FormatDate(date time.Time) string

func FormatDateTime

func FormatDateTime(date time.Time) string

func GetCodeDepartementFromCodeInseeCommune

func GetCodeDepartementFromCodeInseeCommune(codePostal string) string

Renvoie le code INSEE du département en fonction du code INSEE d'une commune

func Normalize

func Normalize(value string) string

func Now

func Now() time.Time

func SetTime

func SetTime(t time.Time)

Types

type DateString

type DateString struct {
	time.Time
}

func Date

func Date(datestr string) DateString

func (*DateString) MarshalJSON

func (date *DateString) MarshalJSON() ([]byte, error)

func (*DateString) Scan

func (date *DateString) Scan(value interface{}) error

Scan permet à go-pg de bien décoder la valeur en base

func (*DateString) UnmarshalJSON

func (date *DateString) UnmarshalJSON(input []byte) error

Jump to

Keyboard shortcuts

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