Coder Social home page Coder Social logo

go-calendar's Introduction

Date manipulation functions.


// IsLeap returns true if year is a leap year.
func IsLeap(year int64) bool

// NextDay advance Time structure to the next day.
func NextDay(t *time.Time)

// PrevDay adjust Time structure one day behind.
func PrevDay(t *time.Time)

// NextMonth advance Time structure one month ahead.
func NextMonth(t *time.Time)

// PrevMonth adjust Time structure one month behind.
func PrevMonth(t *time.Time)

// Weekday returns day of week number.
//
// Use Sakamoto's method (valid for dates in Oct 15, 1582 - Dec 31, 9999)
// (see http://en.wikipedia.org/wiki/Calculating_the_day_of_the_week )
//
// Args:
//	year (e.g., 1988)
//	month (1-12)
//	day of the month (1-31)
// Returns:
//	0 = Sunday, 1 = Monday, ...
//
func Weekday(year, month, day int) int

go-calendar's People

Contributors

mrovner avatar mish33 avatar

Stargazers

Victor Ruiz avatar  avatar Jesus Alvarez avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.