(t time.Time)
| 71 | } |
| 72 | |
| 73 | func getDatePrecisionFromTime(t time.Time) string { |
| 74 | if t.Nanosecond()%1000000 != 0 && t.Nanosecond()%1000 != 0 { |
| 75 | return "microseconds" |
| 76 | } |
| 77 | if t.Nanosecond()%1000000 != 0 { |
| 78 | return "microseconds" |
| 79 | } |
| 80 | if t.Nanosecond() != 0 { |
| 81 | return "milliseconds" |
| 82 | } |
| 83 | if t.Second() != 0 { |
| 84 | return "second" |
| 85 | } |
| 86 | if t.Minute() != 0 { |
| 87 | return "minute" |
| 88 | } |
| 89 | if t.Hour() != 0 { |
| 90 | return "hour" |
| 91 | } |
| 92 | return "day" |
| 93 | } |
| 94 | |
| 95 | func computeTimestampRange(ts TimestampValue) (floor time.Time, ceiling time.Time) { |
| 96 | t := ts.Time |
no outgoing calls
no test coverage detected