- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExampleTime_Truncate (0.14 sec)
-
src/time/example_test.go
// t.Round( 1ms) = 12:15:30.918 // t.Round( 1s) = 12:15:31 // t.Round( 2s) = 12:15:30 // t.Round( 1m0s) = 12:16:00 // t.Round( 10m0s) = 12:20:00 // t.Round(1h0m0s) = 12:00:00 } func ExampleTime_Truncate() { t, _ := time.Parse("2006 Jan 02 15:04:05", "2012 Dec 07 12:15:30.918273645") trunc := []time.Duration{ time.Nanosecond, time.Microsecond, time.Millisecond, time.Second, 2 * time.Second,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 13 01:05:00 UTC 2024 - 22.4K bytes - Viewed (0)