history

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCommits

func FindCommits(repo *git.Repository, dates []time.Time) (map[time.Time]plumbing.Hash, error)

FindCommits walks the commit log from HEAD and, for each target date, finds the last commit whose Author.When is at or before that date. Dates with no prior commits are omitted from the result map.

func FormatPeriod

func FormatPeriod(d time.Time, interval string) string

FormatPeriod formats a date according to the interval type.

For "monthly": returns "2006-01" format. For "weekly": returns "2006-01-02" format.

func GenerateDates

func GenerateDates(since, until, interval string) []time.Time

GenerateDates produces a slice of target dates based on interval.

For "monthly": since/until are "YYYY-MM" strings. Returns end-of-month dates (last day, 23:59:59 UTC) for each month from since to until inclusive.

For "weekly": since/until are "YYYY-MM-DD" strings. Returns end-of-day dates (23:59:59 UTC) every 7 days from since to until inclusive.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL