Skip to content

Ruby on Rails inspired time manipulation functions in Go.

License

Notifications You must be signed in to change notification settings

nirdosh17/timeutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card

Utility functions for Time

Ruby on Rails inspired utility functions for Go to manipulate Time.

Install

go get github.com/nirdosh17/timeutil

Usage

  newT := timeutil.BeginningOfDay(time.Now())
  fmt.Println(newT)

Available Functions

  • BeginningOfDay(Time) Time

  • BeginningOfHour(Time) Time

  • BeginningOfMinute(Time) Time

  • EndOfDay(Time) Time

  • EndOfHour(Time) Time

  • EndOfMinute(Time) Time

  • MonthsAgo(Time, days) Time

  • MonthsAfter(Time, days) Time

  • DaysAgo(Time, days) Time

  • DaysAfter(Time, days) Time

  • IsWeekday(Time) bool

  • IsWeekend(Time) bool

About

Ruby on Rails inspired time manipulation functions in Go.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages