From 2e89445a4eb3eb40bf909a0f385f2ce6c0c8f79e Mon Sep 17 00:00:00 2001 From: JKrishnaD Date: Fri, 6 Mar 2026 17:57:11 +0530 Subject: [PATCH] feat: get today's commit's --- checkgit/src/render.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/checkgit/src/render.rs b/checkgit/src/render.rs index 87a2fdf..6a4eba8 100644 --- a/checkgit/src/render.rs +++ b/checkgit/src/render.rs @@ -277,9 +277,19 @@ pub fn render_heatmap(matrix: &[Vec]) { } } + let today = UTC::now().weekday().number_from_sunday() - 1; + + let todays_commits = matrix + .get(today as usize) + .and_then(|r| r.get(weeks.saturating_sub(1))) + .copied() + .unwrap_or(0); + println!(); println!( - "{} {} {} {}", + "{} {} {} {} {} {}", + "Today's commits:".truecolor(125, 133, 144), + todays_commits.to_string().bold(), "Current streak:".truecolor(125, 133, 144), current.to_string().bold(), "Longest streak:".truecolor(125, 133, 144),