2024-01-29 15:58:56 -05:00
|
|
|
// from chapter 10
|
|
|
|
package main
|
|
|
|
|
2024-01-31 14:45:10 -05:00
|
|
|
import (
|
|
|
|
"fmt"
|
2024-02-03 11:00:34 -05:00
|
|
|
"trying_out_go/pkg/calendar"
|
2024-01-31 14:45:10 -05:00
|
|
|
)
|
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
|
|
|
}
|