timetools

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 2 Imported by: 4

README

timetools

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorrectDate added in v0.0.3

func CorrectDate(date string) error

date format ej: "2006-01-02"

func DayOfYear added in v0.0.3

func DayOfYear(year, month, day int) (int, error)

DayOfYear calcula el día del año para una fecha dada y retorna un error si la fecha no es válida.

func GetAdjustedBirthDay added in v0.0.3

func GetAdjustedBirthDay(yearBirth, dayOfYearBirth, yearNow, dayOfYearNow int) int

Obtiene la fecha de nacimiento ajustada para solucionar las diferencias de los años bisiestos.

func HourArrayToMap

func HourArrayToMap(hour_in []string) (out map[string]string)

ej: "08:00" -> "08:00": "8:00"

func HowOldAreYou added in v0.0.3

func HowOldAreYou(birthday string, time model.TimeNow) (int, error)

obtener edad en formato numero ej: (birthday) "2006-01-02"

func IsLeap added in v0.0.3

func IsLeap(year int) bool

es bisiesto este año?

func ShortDay added in v0.0.3

func ShortDay() map[int]string

func ShortMonth added in v0.0.3

func ShortMonth() map[int]string

func SpanishDay added in v0.0.3

func SpanishDay() *map[int]string

func SpanishMonth added in v0.0.3

func SpanishMonth() *map[int]string

func StringDateToShort added in v0.0.3

func StringDateToShort(date_in string, week model.TimeWeek) (textDay, day, textMonth, year string, err error)

formato fecha "2006-01-02" out; Vie,25,Dic,2011

func StringToDateSeparate added in v0.0.3

func StringToDateSeparate(date string) (year, month, day int, err error)

formato fecha "2006-01-02"

Types

This section is empty.

Jump to

Keyboard shortcuts

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