Documentation
¶
Index ¶
- func ChangeDateSeparator(date, separator string) (new_date string, err string)
- func CheckDateExists(date string) (err string)
- func CorrectFormatDate(date string) (err string)
- func DateToDayHour(real_date, fake_date string, df *model.DateFormat) (date, hour string)
- func DayOfYear(year, month, day int) (d int, err string)
- func GetAdjustedBirthDay(yearBirth, dayOfYearBirth, yearNow, dayOfYearNow int) int
- func HourArrayToMap(hour_in []string) (out map[string]string)
- func HowOldAreYou(birthday string, time model.TimeNow) (age int, err string)
- func IsLeap(year int) bool
- func JointDate(day, month, year string, spacer ...string) string
- func MonthDays(year int) map[int]int
- func SeparateDateHourAndSeconds(date_in string) (date, hour, seconds string)
- func ShortDay() map[int]string
- func ShortMonth() map[int]string
- func SpanishDay() *map[int]string
- func SpanishMonth() map[int]string
- func StringDateToShort(date_in string, week model.TimeWeek) (textDay, day, textMonth, year, err string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeDateSeparator ¶ added in v0.0.5
verifica y cambia formato de fecha según separador ingresado ej:2006-01-02 "/" = 2006/01/02
func CheckDateExists ¶ added in v0.0.5
verifica formato 2006-01-02 y si los rangos de el año, mes y dia son validos y si los Dias existen según año y mes bisiesto
func CorrectFormatDate ¶ added in v0.0.5
verifica formato y valores numéricos en sus posiciones ej: "2006-01-02"
func DateToDayHour ¶ added in v0.0.31
func DateToDayHour(real_date, fake_date string, df *model.DateFormat) (date, hour string)
real_date:2006-01-02 15:04:05 fake_date 2006-01-02 or same real date return: date:"2006-01-02" hour:"15:04" optional seconds:"15:04:05" left
func DayOfYear ¶ added in v0.0.3
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
Obtiene la fecha de nacimiento ajustada para solucionar las diferencias de los años bisiestos.
func HourArrayToMap ¶
ej: "08:00" -> "08:00": "8:00"
func HowOldAreYou ¶ added in v0.0.3
obtener edad en formato numero ej: (birthday) "2006-01-02"
func JointDate ¶ added in v0.0.30
ej: day:01, month:30, year:2003 default result: "2003-30-01" with optional spacer ej: / = "2003/30/01" Important: input data is not validated
func SeparateDateHourAndSeconds ¶ added in v0.0.31
date_in: "2006-01-02 15:04:05" or "2006-01-02" out: date:"2006-01-02" hour:"15:04" seconds:"05"
func ShortMonth ¶ added in v0.0.3
func SpanishDay ¶ added in v0.0.3
func SpanishMonth ¶ added in v0.0.3
Types ¶
This section is empty.