Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleTime_AppendFormat (0.15 sec)

  1. src/time/example_test.go

    	end := time.Date(2000, 1, 1, 12, 0, 0, 0, time.UTC)
    
    	difference := end.Sub(start)
    	fmt.Printf("difference = %v\n", difference)
    
    	// Output:
    	// difference = 12h0m0s
    }
    
    func ExampleTime_AppendFormat() {
    	t := time.Date(2017, time.November, 4, 11, 0, 0, 0, time.UTC)
    	text := []byte("Time: ")
    
    	text = t.AppendFormat(text, time.Kitchen)
    	fmt.Println(string(text))
    
    	// Output:
    	// Time: 11:00AM
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 01:05:00 UTC 2024
    - 22.4K bytes
    - Viewed (0)
Back to top