2024-01-29 15:58:56 -05:00
|
|
|
// from chapter 10
|
|
|
|
package main
|
|
|
|
|
2024-01-31 14:45:10 -05:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"git.linuxhg.com/Go_Training/calendar"
|
|
|
|
)
|
2024-01-29 15:58:56 -05:00
|
|
|
|
2024-01-31 14:45:10 -05:00
|
|
|
func companyCalendar() {
|
|
|
|
event := calendar.Event{}
|
|
|
|
err := event.SetTitle("Mom's Birthday")
|
|
|
|
Error(err)
|
|
|
|
err = event.SetYear(2019)
|
|
|
|
Error(err)
|
|
|
|
err = event.SetMonth(5)
|
|
|
|
Error(err)
|
|
|
|
err = event.SetDay(27)
|
|
|
|
Error(err)
|
|
|
|
|
|
|
|
fmt.Println(event.Title())
|
|
|
|
fmt.Println(event.Year())
|
|
|
|
fmt.Println(event.Month())
|
|
|
|
fmt.Println(event.Day())
|
2024-01-29 15:58:56 -05:00
|
|
|
}
|