示例#1
0
func ExampleJune2() {
	// Example 27.b, p. 180.
	e, err := pp.LoadPlanet(pp.Earth)
	if err != nil {
		fmt.Println(err)
		return
	}
	j := solstice.June2(1962, e)
	t := j - 2437836.5 // 0h 1962 June 21
	// result is VSOP87 result given in example 27.a, p. 180
	fmt.Println(sexa.FmtTime(unit.TimeFromDay(t)))
	// Output:
	// 21ʰ24ᵐ42ˢ
}
示例#2
0
func ExampleJune2() {
	// Example 27.b, p. 180.
	e, err := pp.LoadPlanet(pp.Earth, "")
	if err != nil {
		fmt.Println(err)
		return
	}
	j := solstice.June2(1962, e)
	t := j - 2437836.5 // 0h 1962 June 21
	// result is VSOP87 result given in example 27.a, p. 180
	fmt.Println(base.NewFmtTime(t * 24 * 60 * 60))
	// Output:
	// 21ʰ24ᵐ42ˢ
}