xtablo-source/deprecated/internal/web/dates/french.go
Arthur Belleville 5d0c201e86
Some checks failed
backend-ci / Backend tests (pull_request) Failing after 53s
backend-ci / Backend tests (push) Failing after 1s
Some work
2026-05-23 17:26:01 +02:00

13 lines
336 B
Go

package dates
import (
"fmt"
"time"
)
var frenchMonths = [...]string{"janv.", "fevr.", "mars", "avr.", "mai", "juin", "juil.", "aout", "sept.", "oct.", "nov.", "dec."}
func FormatFrenchDate(value time.Time) string {
month := frenchMonths[int(value.Month())-1]
return fmt.Sprintf("%02d %s %d", value.Day(), month, value.Year())
}