Popularity
0.4
Stable
Activity
0.0
Stable
0
2
0
Description
Package for work with date in golang
Partly is an analog Qt QDate Class.
Programming language: Go
License: GNU General Public License v3.0 only
date alternatives and similar packages
Based on the "Date & Time" category.
Alternatively, view date alternatives based on common mentions on social networks and blogs.
-
Carbon
A simple, semantic and developer-friendly golang package for datetime -
timeutil
timeutil - useful extensions (Timedelta, Strftime, ...) to the golang's time package -
go-persian-calendar
The implementation of Persian (Solar Hijri) Calendar in Go -
go-tinytime
Time struct in Go that uses 4 bytes of memory vs the 24 bytes of time.Time -
feiertage
Gesetzliche Feiertage und mehr in Deutschland und Österreich (Bank holidays/public holidays in Austria and Germany)
Collect and Analyze Billions of Data Points in Real Time
Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
Promo
www.influxdata.com
Do you think we are missing an alternative of date or a related project?
Popular Comparisons
README
date
Package for work with date in golang
Partly is an analog Qt QDate Class.
Features:
- dates before or equal 4 October 1582 considered by Julian calendar.
- dates equal or after 15 October 1582 considered by Gregorian calendar.
- dates more than 4 October and less 15 October 1582 year is invalid (error: date.ErrPassage).
- year zero is invalid (if try call function FromDate(0, month, day) then return error ErrZeroYear).
- dates represented as the Julian day (first Julian day (jd = 0) is 1 January -4713 year), dates less first JD is invalid.
Installation
go get github.com/toelsiba/date
Usage
Example usage JulianDay & Weekday:
package main
import (
"fmt"
"log"
"time"
"github.com/toelsiba/date"
)
func main() {
// Nikolay Ivanovich Pirogov was born on 25 November 1810
d, err := date.FromDate(1810, time.November, 25)
if err != nil {
log.Fatal(err)
}
fmt.Printf("For date %s:\n", d)
fmt.Println("\t- JulianDay =", d.JulianDay())
fmt.Println("\t- Weekday =", d.Weekday())
}
result:
For date 1810-11-25:
- JulianDay = 2382477
- Weekday = Sunday
Example usage AddDays:
package main
import (
"fmt"
"log"
"time"
"github.com/toelsiba/date"
)
func main() {
d, err := date.FromDate(-1, time.December, 31)
if err != nil {
log.Fatal(err)
}
fmt.Println(d)
d = d.AddDays(1)
fmt.Println(d)
}
result:
-0001-12-31
0001-01-01