@@ 1,33 @@
+// Package exdura provides extra time intervals greater than one hour.
+// It makes a few assumptions - first, that the user is using a Gregorian calendar.
+// Second, it assumes that the user is in a context where exact precision for months and years is not needed.
+// If you do need exact precision for months or years, it would be better to roll it yourself.
+package exdura
+
+import "time"
+
+// Days takes a count and converts it into a [time.Duration] representing that count of days.
+func Days(count int) time.Duration {
+ return toDuration(count) * 24 * time.Hour
+}
+
+// Weeks takes a count and converts it into a [time.Duration] representing that count of weeks.
+func Weeks(count int) time.Duration {
+ return toDuration(count) * Days(7)
+}
+
+// Months takes a count and converts it into a [time.Duration] representing that count of months.
+// It assumes that a month is equivalent to four-weeks.
+func Months(count int) time.Duration {
+ return toDuration(count) * Weeks(4)
+}
+
+// Years takes a count and converts it into a [time.Duration] representing that count of years.
+// It assumes that a year is equivalent to 52 weeks.
+func Years(count int) time.Duration {
+ return toDuration(count) * Weeks(52)
+}
+
+func toDuration(number int) time.Duration {
+ return time.Duration(number)
+}