chrono

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsItToday

func IsItToday(t time.Time) bool

IsItToday checks if given time occurs on current calendar day

func Last7Days

func Last7Days() (days []carbon.Carbon)

Last7Days returns timestamps for the last 7 consecutive days

func Last30Days

func Last30Days() (days []carbon.Carbon)

Last30Days returns timestamps for the last 30 consecutive days

func LastFewDays

func LastFewDays(n int) (days []carbon.Carbon)

LastFewDays returns a list of timestamps for the most recent N days.

func Within7Days

func Within7Days() (start, end carbon.Carbon)

Within7Days returns 7-day time range

func Within30Days

func Within30Days() (start, end carbon.Carbon)

Within30Days returns 30-day time range

func WithinAFewDays

func WithinAFewDays(n int) (start, end carbon.Carbon)

WithinAFewDays calculates time range for previous N days including current day

func WithinMonth added in v0.11.0

func WithinMonth(year int, month int) (start, end carbon.Carbon)

WithinMonth calculates time range boundaries for given calendar month

Types

This section is empty.

Jump to

Keyboard shortcuts

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