MCPcopy Create free account
hub / github.com/ccusage/ccusage / format_local_block_start

Function format_local_block_start

rust/crates/ccusage/src/blocks.rs:260–283  ·  view source on GitHub ↗
(timestamp: TimestampMs, compact: bool)

Source from the content-addressed store, hash-verified

258}
259
260fn format_local_block_start(timestamp: TimestampMs, compact: bool) -> String {
261 let parts = local_parts(timestamp);
262 if compact {
263 format!(
264 "{:02}/{:02}, {:02}:{:02} {}",
265 parts.month,
266 parts.day,
267 hour_12(parts.hour),
268 parts.minute,
269 am_pm(parts.hour)
270 )
271 } else {
272 format!(
273 "{}/{}/{}, {}:{:02}:{:02} {}",
274 parts.month,
275 parts.day,
276 parts.year,
277 hour_12(parts.hour),
278 parts.minute,
279 parts.second,
280 am_pm(parts.hour)
281 )
282 }
283}
284
285fn format_local_block_end(timestamp: TimestampMs, compact: bool) -> String {
286 let parts = local_parts(timestamp);

Callers 2

format_block_timeFunction · 0.85
format_local_block_endFunction · 0.85

Calls 1

local_partsFunction · 0.85

Tested by

no test coverage detected