项目作者: mantishK

项目描述 :
Google Calendar like event generator in Go
高级语言: Go
项目地址: git://github.com/mantishK/evgen.git
创建时间: 2020-03-29T11:16:14Z
项目社区:https://github.com/mantishK/evgen

开源协议:MIT License

下载


Evgen

Google Calendar like event generator for Go.

Features

  • Daily, weekly, monthly, and yearly events
  • Create events with number of occurrences or end date
  • Weekly events with an option to choose multiple days in a week

Usage

Generating daily events

  1. startAt := time.Now()
  2. frequency := 2 // every two days
  3. qty := 4 // total of four occurrences
  4. events := evegen.Generate("daily", startAt, nil, frequency, qty, nil)

Generating weekly events

  1. startAt := time.Now()
  2. dayOfWeek := []int{0, 2} // Sunday and Tuesday
  3. frequency := 2 // every other week
  4. qty := 0
  5. endDate := startAt.AddDate(0, 4, 0) // four months from now
  6. events := evegen.Generate("weekly", startAt, dayOfWeek, frequency, qty, endDate)

TODO

  • Montly events with an option to choose a day and a week of the month

Contribution

Contributions welcome via Github pull requests and issues.

License

This project is licensed under the MIT License. Please refer the License.txt file.