Example #1
0
// installs this format - should be called at the very start of the program, prior to registring
// the first provider.
func Install() {
	fmt.RegisterFormat(Format, fmt.FormatDefinitionFunc(parse))
}
Example #2
0
// Registers the date formats with the format package
func Install() {
	fmt.RegisterFormat(DateFormat, dateFormatType(DateFormat))
	fmt.RegisterFormat(TimeFormat, dateFormatType(TimeFormat))
	fmt.RegisterFormat(DateTimeFormat, dateFormatType(DateTimeFormat))
}