{"repo":"snabb/isoweek","free":true,"listed":false,"github":"https://github.com/snabb/isoweek","clone":"git clone https://github.com/snabb/isoweek.git","description":"Go package for calculating a start date and time of ISO 8601 week. (golang)","language":"Go","stars":44,"topics":["golang","go","date","iso8601","week","calendar","julian"],"license":"MIT","category":"productivity","readme_excerpt":"isoweek ======= The Go package isoweek calculates a starting date and time of [ISO 8601] week. ISO 8601 standard defines the common [week number] system used in Europe and many other countries. Monday is the first day of a week. The Go standard library time package has ISOWeek function for getting ISO 8601 week number of a given time.Time , but there is no reverse functionality for getting a date from a week number. This package implements that. Invalid input is silently accepted. There is a separate Validate function if week number validation is needed. There are also functions for working with [Julian day numbers]. Using Julian day numbers is often the easiest and fastest way to do date calculations. This package does not work with the \"traditional\" week system used in US/Canada/Japan/etc. (weeks starting on Sundays). However the Julian day number functions may be still useful. [ISO 8601]: https://en.wikipedia.org/wiki/ISO 8601 [week number]: https://en.wikipedia.org/wiki/ISO week date [Julian day numbers]: https://en.wikipedia.org/wiki/Julian day Documentation ------------- https://pkg.go.dev/github.com/snabb/isoweek Examples -------- Using weeks with Go standard time.Time A simple example which gets the starting time of the 1st week of 1985: The returned time may be within a previous year as can be seen above. The AddDate function in Go standard library time package can be used for getting the Time at the end of the week or for iterating through weeks: Using weeks, dates ","default_branch":null,"files":null,"tree":[],"storefront":"/r/snabb","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/snabb/isoweek/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}